summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-06 17:24:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-06 17:24:08 +0000
commite47d0821bfd0def11d10bb68a46a3335934f283a (patch)
treecc930329350bc518f5c9dc586d4e3f0fb1d72091 /perl-install
parent1dfe0932b061617719939a72f91fb70ac4ac23b8 (diff)
downloaddrakx-e47d0821bfd0def11d10bb68a46a3335934f283a.tar
drakx-e47d0821bfd0def11d10bb68a46a3335934f283a.tar.gz
drakx-e47d0821bfd0def11d10bb68a46a3335934f283a.tar.bz2
drakx-e47d0821bfd0def11d10bb68a46a3335934f283a.tar.xz
drakx-e47d0821bfd0def11d10bb68a46a3335934f283a.zip
perl_checker compliance
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm6
-rw-r--r--perl-install/fsedit.pm3
-rw-r--r--perl-install/install_steps_interactive.pm2
-rw-r--r--perl-install/partition_table.pm5
-rw-r--r--perl-install/pkgs.pm3
-rwxr-xr-xperl-install/standalone/adduserdrake2
-rwxr-xr-xperl-install/standalone/drakclock2
-rw-r--r--perl-install/standalone/localedrake1
8 files changed, 12 insertions, 12 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 4aea403b8..1246fbdb3 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -587,12 +587,12 @@ sub stringlist() {
sub tryOpen($) {
my $F;
- sysopen $F, devices::make($_[0]), c::O_NONBLOCK() and $F;
+ sysopen($F, devices::make($_[0]), c::O_NONBLOCK()) && $F;
}
sub tryWrite($) {
my $F;
- sysopen $F, devices::make($_[0]), 1 | c::O_NONBLOCK() and $F;
+ sysopen($F, devices::make($_[0]), 1 | c::O_NONBLOCK()) && $F;
}
sub syslog() {
@@ -685,7 +685,7 @@ sub probeSerialDevices() {
sub probeSerial($) { $serialprobe{$_[0]} }
sub hasModem($) {
- $serialprobe{$_[0]} and $serialprobe{$_[0]}{CLASS} eq 'MODEM' and $serialprobe{$_[0]}{DESCRIPTION};
+ $serialprobe{$_[0]} && $serialprobe{$_[0]}{CLASS} eq 'MODEM' && $serialprobe{$_[0]}{DESCRIPTION};
}
sub hasMousePS2 {
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 6aed45d48..dcba0d267 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -678,7 +678,8 @@ sub undo_prepare {
sub undo {
my ($all_hds) = @_;
foreach (@{$all_hds->{hds}}) {
- my $h; eval pop @{$_->{undo}} || next;
+ my $code = pop @{$_->{undo}} or next;
+ my $h; eval $code;
@$_{@partition_table::fields2save} = @$h;
$_->{isDirty} = $_->{needKernelReread} = 1 if $_->{hasBeenDirty};
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 2bb3caad5..9c915051f 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -1037,7 +1037,7 @@ sub summary {
label => N("Firewall"),
val => sub {
require network::shorewall;
- my $shorewall = network::shorewall::read($o);
+ my $shorewall = network::shorewall::read($o, 'not_silent');
$shorewall && !$shorewall->{disabled} ? N("activated") : N("disabled");
},
clicked => sub {
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index a4120d0bb..2d3fe168d 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -522,8 +522,9 @@ sub read {
verifyPrimary($pt);
eval {
my $need_removing_empty_extended;
- $pt->{extended} and read_extended($hd, $pt->{extended}, \$need_removing_empty_extended) || return 0;
-
+ if ($pt->{extended}) {
+ read_extended($hd, $pt->{extended}, \$need_removing_empty_extended) or return 0;
+ }
if ($need_removing_empty_extended) {
#- special case when hda5 is empty, it must be skipped
#- (windows XP generates such partition tables)
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index fb2960042..31646e367 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -155,7 +155,8 @@ sub packageByName {
$best = $_;
}
}
- $best or log::l("unknown package `$name'") && undef;
+ $best or log::l("unknown package `$name'");
+ $best;
}
sub packageById {
my ($packages, $id) = @_;
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index ff024dbf7..4db218671 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -8,8 +8,6 @@ use common;
use interactive;
use any;
-my @etc_pass_fields = qw(name pw uid gid realname home shell);
-my @shells = any::shells();
my $isMD5 = cat_("/etc/pam.d/system-auth") =~ /md5/;
my $isShadow = cat_("/etc/pam.d/system-auth") =~ /shadow/;
diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock
index 35620e4a8..4637e1b46 100755
--- a/perl-install/standalone/drakclock
+++ b/perl-install/standalone/drakclock
@@ -244,7 +244,7 @@ sub motion_event {
$button_reset->set_sensitive(1);
}
- $$Radian = -atan2(($event->x-$midx), ($event->y-$midy)) + $PI;
+ $$Radian = -atan2($event->x - $midx, $event->y - $midy) + $PI;
Repaint($widget);
rad_to_time();
diff --git a/perl-install/standalone/localedrake b/perl-install/standalone/localedrake
index 11187758c..e89804d3f 100644
--- a/perl-install/standalone/localedrake
+++ b/perl-install/standalone/localedrake
@@ -33,7 +33,6 @@ if (defined $klang) {
my $locale = lang::read('', $>);
my $in = 'interactive'->vnew;
-my $one_lang_only;
sub select_language() {
$locale->{lang} = any::selectLanguage($in, $locale->{lang});