summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-03 13:12:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-03 13:12:13 +0000
commit23c259c90cbed0280c9e23b3c9763363c148c472 (patch)
tree608f1f62a585f39703a8f42d83447dfcf045a826 /perl-install
parent5d3903d31de512391136aa05e77de530baceb64a (diff)
downloaddrakx-backup-do-not-use-23c259c90cbed0280c9e23b3c9763363c148c472.tar
drakx-backup-do-not-use-23c259c90cbed0280c9e23b3c9763363c148c472.tar.gz
drakx-backup-do-not-use-23c259c90cbed0280c9e23b3c9763363c148c472.tar.bz2
drakx-backup-do-not-use-23c259c90cbed0280c9e23b3c9763363c148c472.tar.xz
drakx-backup-do-not-use-23c259c90cbed0280c9e23b3c9763363c148c472.zip
do not use "local my $F, ...", use "local(my $F, ...) instead
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/test.pm4
-rw-r--r--perl-install/commands.pm2
-rw-r--r--perl-install/common.pm4
-rw-r--r--perl-install/detect_devices.pm4
-rw-r--r--perl-install/devices.pm2
-rw-r--r--perl-install/install_steps.pm6
6 files changed, 9 insertions, 13 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm
index aa12d2b5b..307c0ff7a 100644
--- a/perl-install/Xconfig/test.pm
+++ b/perl-install/Xconfig/test.pm
@@ -67,7 +67,7 @@ sub test {
my $b = before_leaving { unlink $f_err };
if (!xtest(":9")) {
- open my $F, $f_err;
+ open(my $F, $f_err);
local $_;
i: while (<$F>) {
@@ -99,7 +99,7 @@ sub test {
}
$::noShadow = 1;
- open my $F, "|perl 2>/dev/null";
+ open(my $F, "|perl 2>/dev/null");
print $F "use lib qw(", join(' ', @INC), ");\n";
print $F q(
BEGIN { $::no_ugtk_init = 1 }
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index e4b393f76..aba586d60 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -331,7 +331,7 @@ sub more {
require devices;
my $tty = devices::make('tty');
my $n = 0;
- open my $IN, $tty or die "can't open $tty\n";
+ open(my $IN, $tty) or die "can't open $tty\n";
local $_;
while (<>) {
if (++$n == 25) {
diff --git a/perl-install/common.pm b/perl-install/common.pm
index dbb954ea3..0e431cbe4 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -34,7 +34,7 @@ sub N_ { $_[0] }
sub salt {
my ($nb) = @_;
require devices;
- open my $F, devices::make("random") or die "missing random";
+ open(my $F, devices::make("random")) or die "missing random";
my $s; read $F, $s, $nb;
$s = pack("b8" x $nb, unpack "b6" x $nb, $s);
$s =~ tr|\0-\x3f|0-9a-zA-Z./|;
@@ -72,7 +72,7 @@ sub availableRamMB() {
sub setVirtual {
my ($vt_number) = @_;
my $vt = '';
- sysopen my $C, "/dev/console", 2 or die "failed to open /dev/console: $!";
+ sysopen(my $C, "/dev/console", 2) or die "failed to open /dev/console: $!";
ioctl($C, c::VT_GETSTATE(), $vt) &&
ioctl($C, c::VT_ACTIVATE(), $vt_number) &&
ioctl($C, c::VT_WAITACTIVE(), $vt_number) or die "setVirtual failed";
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index fdac50818..f2bd17601 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -615,7 +615,7 @@ sub whatUsbport() {
my $realport = devices::make($port);
next if !$realport;
next if ! -r $realport;
- open my $PORT, $realport or next;
+ open(my $PORT, $realport) or next;
my $idstr = "";
# Calculation of IOCTL function 0x84005001 (to get device ID
# string):
@@ -735,7 +735,7 @@ sub hasMousePS2 {
}
sub raidAutoStartIoctl {
- sysopen my $F, devices::make("md0"), 2 or return;
+ sysopen(my $F, devices::make("md0"), 2) or return;
ioctl $F, 2324, 0;
}
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 153017cdc..3d97a13b4 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -53,7 +53,7 @@ sub set_loop {
if ($encrypt_key && $encryption) {
my $cmd = "losetup -p 0 -e $encryption $dev $file";
log::l("calling $cmd");
- open my $F, "|$cmd";
+ open(my $F, "|$cmd");
print $F $encrypt_key;
close $F or die "losetup failed";
} else {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index a9a613f0a..838694be8 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -501,14 +501,10 @@ GridHeight=70
#- fix bad update-alternatives that may occurs after upgrade (but let them for install too).
if (-d "$o->{prefix}/etc/alternatives") {
- local *ALTERNATE_DIR; opendir ALTERNATE_DIR, "$o->{prefix}/etc/alternatives";
- local $_;
- while (defined($_ = readdir ALTERNATE_DIR)) {
- -e "$o->{prefix}/etc/alternatives/$_" and next;
+ foreach (all("$o->{prefix}/etc/alternatives")) {
log::l("fixing broken alternative $_");
run_program::rooted($o->{prefix}, "update-alternatives", "--auto", $_);
}
- closedir ALTERNATE_DIR;
}
#- update oem lilo image if it exists.