diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-03 12:46:27 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-03 12:46:27 +0000 |
commit | 7a352652b5b1a5711b1fd3e0a918f84ea6f1fc95 (patch) | |
tree | 1ce8aed7358699a4698da8c0de75b15aa9ec2de0 /perl-install/Xconfig | |
parent | 49c020779005ca18fffc440a76dfdea0217b4541 (diff) | |
download | drakx-backup-do-not-use-7a352652b5b1a5711b1fd3e0a918f84ea6f1fc95.tar drakx-backup-do-not-use-7a352652b5b1a5711b1fd3e0a918f84ea6f1fc95.tar.gz drakx-backup-do-not-use-7a352652b5b1a5711b1fd3e0a918f84ea6f1fc95.tar.bz2 drakx-backup-do-not-use-7a352652b5b1a5711b1fd3e0a918f84ea6f1fc95.tar.xz drakx-backup-do-not-use-7a352652b5b1a5711b1fd3e0a918f84ea6f1fc95.zip |
do not use "local *F"
Diffstat (limited to 'perl-install/Xconfig')
-rw-r--r-- | perl-install/Xconfig/test.pm | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm index 2d465ab82..aa12d2b5b 100644 --- a/perl-install/Xconfig/test.pm +++ b/perl-install/Xconfig/test.pm @@ -67,15 +67,15 @@ sub test { my $b = before_leaving { unlink $f_err }; if (!xtest(":9")) { - local *F; open F, $f_err; + open my $F, $f_err; local $_; - i: while (<F>) { + i: while (<$F>) { if (Xconfig::card::using_xf4($card)) { if (/^\(EE\)/ && !/Disabling/ || /^Fatal\b/) { my @msg = !/error/ && $_; local $_; - while (<F>) { + while (<$F>) { /reporting a problem/ and last; push @msg, $_; $in->ask_warn('', [ N("An error occurred:"), " ", @msg, N("\ntry to change some parameters") ]); @@ -86,7 +86,7 @@ sub test { if (/\b(error|not supported)\b/i) { my @msg = !/error/ && $_; local $_; - while (<F>) { + while (<$F>) { /not fatal/ and last i; /^$/ and last; push @msg, $_; @@ -99,10 +99,9 @@ sub test { } $::noShadow = 1; - local *F; - open F, "|perl 2>/dev/null"; - print F "use lib qw(", join(' ', @INC), ");\n"; - print F q( + open my $F, "|perl 2>/dev/null"; + print $F "use lib qw(", join(' ', @INC), ");\n"; + print $F q( BEGIN { $::no_ugtk_init = 1 } require lang; require my_gtk; @@ -138,7 +137,7 @@ sub test { my $in = interactive::gtk->new; $in->exit($in->ask_yesorno('', [ N("Is this the correct setting?"), $text ], 0) ? 0 : 222); ); - my $rc = close F; + my $rc = close $F; my $err = $?; $rc || $err == 222 << 8 or $in->ask_warn('', N("An error occurred, try to change some parameters")); |