diff options
-rw-r--r-- | perl-install/interactive_gtk.pm | 5 | ||||
-rw-r--r-- | perl-install/printer.pm | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 719313549..4e525e5c7 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -29,6 +29,7 @@ sub ask_from_listW { my ($o, $title, $messages, $l, $def) = @_; if (@$l < 5 && sum(map { length $_ } @$l) < 70) { + my $defW; my $w = my_gtk->new($title, %$o); my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit }; gtkadd($w->{window}, @@ -37,12 +38,12 @@ sub ask_from_listW { map { my $b = new Gtk::Button($_); $b->signal_connect(clicked => [ $f, $_ ]); - $_ eq $def and $def = $b; + $_ eq $def and $defW = $b; $b; } @$l), ), ); - $def->grab_focus if $def; + $defW->grab_focus if $defW; $w->main; } else { my $w = my_gtk->new($title); diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 24b8af811..b02fe3a10 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -363,8 +363,8 @@ sub create_config_file($$%) { while (<IN>) { if (/@@@(.*)@@@/) { - defined($toreplace{$1}) or die "I can't replace $chaine"; - s/@@@(.*)@@@/$toreplace{$1}/g; + my $r = $toreplace{$1} or die "I can't replace $1"; + s/@@@(.*)@@@/$r/g; } print OUT; } |