diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-11-06 19:24:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-11-06 19:24:03 +0000 |
commit | 12e2b5c87a379eec81c5e2d80b67493689691082 (patch) | |
tree | 102f4af9d8bcd168175a4f4dddda3e5862d82c70 | |
parent | 41ba541d10a02a787d5fe4974a9c389093c3b155 (diff) | |
download | drakx-12e2b5c87a379eec81c5e2d80b67493689691082.tar drakx-12e2b5c87a379eec81c5e2d80b67493689691082.tar.gz drakx-12e2b5c87a379eec81c5e2d80b67493689691082.tar.bz2 drakx-12e2b5c87a379eec81c5e2d80b67493689691082.tar.xz drakx-12e2b5c87a379eec81c5e2d80b67493689691082.zip |
make perl_checker happy
-rw-r--r-- | perl-install/detect_devices.pm | 2 | ||||
-rw-r--r-- | perl-install/harddrake/data.pm | 2 | ||||
-rw-r--r-- | perl-install/harddrake/sound.pm | 2 | ||||
-rw-r--r-- | perl-install/network/nfs.pm | 1 | ||||
-rwxr-xr-x | perl-install/scanner.pm | 2 | ||||
-rwxr-xr-x | perl-install/standalone/diskdrake | 1 | ||||
-rwxr-xr-x | perl-install/standalone/service_harddrake | 4 | ||||
-rw-r--r-- | perl-install/ugtk.pm | 2 |
8 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 365c42be7..f399efcef 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -653,7 +653,7 @@ sub whatUsbport() { # field. So use this field with priority for $model when it exists. if (($idstr =~ /MDL:([^;]+);/) || ($idstr =~ /MODEL:([^;]+);/)) { - $model = $1 if !$model; + $model ||= $1; } if ($idstr =~ /SKU:([^;]+);/) { $model = $1; diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index 372ce504b..2392ff82d 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -25,7 +25,7 @@ our @tree = ["HARDDISK","Disk", "harddisk.png", "$sbindir/diskdrake", \&detect_devices::hds, 1 ], ["CDROM","CDROM", "cd.png", "", sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms } , 0 ], ["BURNER","CD/DVD burners", "cd.png", "", \&detect_devices::burners(), 0 ], - ["DVDROM","DVD-ROM", "cd.png", "", sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms}, 0 ], + ["DVDROM","DVD-ROM", "cd.png", "", sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms() }, 0 ], ["TAPE","Tape", "tape.png", "", \&detect_devices::tapes, 0 ], ["VIDEO","Videocard", "video.png", "$sbindir/XFdrake", sub { grep { $_->{driver} =~ /^(Card|Server):/ || $_->{media_type} =~ 'DISPLAY_VGA' } @devices }, 1 ], ["TV","Tvcard", "tv.png", "/usr/bin/XawTV", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} eq 'PCI' } @devices}, 0 ], diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index a1da2d25f..48e8ffbff 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -158,7 +158,7 @@ sub do_switch { sub switch { my ($in, $device) = @_; my $driver = $device->{current_driver}; - $driver = $device->{driver} unless $driver; + $driver ||= $device->{driver}; foreach (@blacklist) { $blacklisted = 1 if $driver eq $_ } my $alternative = get_alternative($driver); diff --git a/perl-install/network/nfs.pm b/perl-install/network/nfs.pm index e1a39aa7a..bd153259f 100644 --- a/perl-install/network/nfs.pm +++ b/perl-install/network/nfs.pm @@ -40,6 +40,7 @@ sub find_servers { my $domain = chomp_(`domainname`); my @servers; + local $_; while (<F>) { chomp; my ($ip, $name) = /(\S+)\s+(\S+)/ or log::l("bad line in rpcinfo output"), next; diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm index 4daf2e1c4..8deb60cff 100755 --- a/perl-install/scanner.pm +++ b/perl-install/scanner.pm @@ -36,7 +36,7 @@ $scannerDB = readScannerDB("$_scannerDBdir/ScannerDB"); sub confScanner { my ($model, $port) = @_; - $port = detect_devices::dev_is_devfs() ? "$prefix/dev/usb/scanner0" : "$prefix/dev/scanner" if !$port; + $port ||= detect_devices::dev_is_devfs() ? "$prefix/dev/usb/scanner0" : "$prefix/dev/scanner"; my $a = $scannerDB->{$model}{server}; #print "file:[$a]\t[$model]\t[$port]\n| ", (join "\n| ", @{$scannerDB->{$model}{lines}}),"\n"; output("$_sanedir/$a.conf", (join "\n",@{$scannerDB->{$model}{lines}})); diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 8f42d9664..2297a07de 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -68,6 +68,7 @@ if ($>) { my $in = 'interactive'->vnew('su'); if ($type eq 'fileshare') { + require any; any::fileshare_config($in); $in->exit(0); } diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index 84097e9a9..29e811ec0 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -46,9 +46,9 @@ foreach (@harddrake::data::tree) { } my @added = difference2([ keys %ID ], [ keys %$oldconfig ]); $msg .= N("Some devices were added:\n", $item) if @added; - $msg .= "- ". harddrake::data::custom_id($ID{$_}, $item) ." was added\n" foreach (@added); + $msg .= "- ". harddrake::data::custom_id($ID{$_}, $item) ." was added\n" foreach @added; @added || @was_removed or next; - next unless (-x $configurator); + next unless -x $configurator; my ($pid, $no); $SIG{ALRM} = sub { $no = 1; kill 15, $pid }; unless ($pid = fork) { diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index 93001beb6..fac3e1646 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -818,7 +818,7 @@ sub gtkcreate_png { sub compose_pixbufs { my ($pixbuf, $back_pixbuf_unaltered, $alpha_threshold) = @_; - $alpha_threshold = 255 unless $alpha_threshold; + $alpha_threshold ||= 255; my ($width, $height) = ($pixbuf->get_height, $pixbuf->get_width); my $back_pixbuf = Gtk::Gdk::Pixbuf->new('rgb', 0, 8, $height, $width); |