diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-11-12 14:05:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-11-12 14:05:52 +0000 |
commit | fc6a72175bf8ee7aed801e4003991e8e9c67c304 (patch) | |
tree | 7f435f15fbc29d6869ddd1db9cd95ef33ba77fde /perl-install | |
parent | 7902fe25c4e57756cbae9cce1e6a88c32e04b9f4 (diff) | |
download | drakx-fc6a72175bf8ee7aed801e4003991e8e9c67c304.tar drakx-fc6a72175bf8ee7aed801e4003991e8e9c67c304.tar.gz drakx-fc6a72175bf8ee7aed801e4003991e8e9c67c304.tar.bz2 drakx-fc6a72175bf8ee7aed801e4003991e8e9c67c304.tar.xz drakx-fc6a72175bf8ee7aed801e4003991e8e9c67c304.zip |
add/remove some spaces to make perl_checker happy
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 2 | ||||
-rw-r--r-- | perl-install/bootlook.pm | 34 | ||||
-rw-r--r-- | perl-install/commands.pm | 4 | ||||
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/install2.pm | 2 | ||||
-rw-r--r-- | perl-install/install_steps_auto_install.pm | 2 | ||||
-rw-r--r-- | perl-install/lang.pm | 6 | ||||
-rw-r--r-- | perl-install/modules.pm | 4 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 6 | ||||
-rw-r--r-- | perl-install/partition_table.pm | 2 | ||||
-rw-r--r-- | perl-install/partition_table/mac.pm | 2 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 4 | ||||
-rw-r--r-- | perl-install/printer/detect.pm | 2 | ||||
-rw-r--r-- | perl-install/printer/gimp.pm | 2 | ||||
-rw-r--r-- | perl-install/printer/main.pm | 36 | ||||
-rw-r--r-- | perl-install/printer/office.pm | 2 | ||||
-rw-r--r-- | perl-install/printer/printerdrake.pm | 20 | ||||
-rw-r--r-- | perl-install/run_program.pm | 2 | ||||
-rw-r--r-- | perl-install/security/main.pm | 2 | ||||
-rw-r--r-- | perl-install/services.pm | 2 | ||||
-rwxr-xr-x | perl-install/standalone/XFdrake | 4 | ||||
-rw-r--r-- | perl-install/ugtk.pm | 4 |
22 files changed, 72 insertions, 74 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index f6e24975c..e13f250aa 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1022,7 +1022,7 @@ sub loadlin_cmd { cp_af("$::prefix$e->{kernel_or_dev}", "$::prefix/boot/vmlinuz") unless -e "$::prefix/boot/vmlinuz"; cp_af("$::prefix$e->{initrd}", "$::prefix/boot/initrd.img") unless -e "$::prefix/boot/initrd.img"; - $e->{label}, sprintf"%s %s initrd=%s root=%s $e->{append}", + $e->{label}, sprintf "%s %s initrd=%s root=%s $e->{append}", lnx4win_file($lilo, "/loadlin.exe", "/boot/vmlinuz", "/boot/initrd.img"), $e->{root} =~ /loop7/ ? "0707" : $e->{root}; #- special to workaround bug in kernel (see #ifdef CONFIG_BLK_DEV_LOOP) } diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm index 45995a69f..8b6cef11a 100644 --- a/perl-install/bootlook.pm +++ b/perl-install/bootlook.pm @@ -108,7 +108,7 @@ my %themes = ('path' =>'/usr/share/bootsplash/themes/', ); my ($cur_res) = cat_('/etc/lilo.conf') =~ /vga=(.*)/; #- verify that current resolution is ok -if ( member( $cur_res, qw( 785 788 791 794))) { +if (member( $cur_res, qw( 785 788 791 794))) { ($cur_res) = $bootloader::vga_modes{$cur_res} =~ /^([0-9x]+).*?$/; } else { $no_bootsplash = 1; #- we can't select any theme we're not in Framebuffer mode :-/ @@ -129,7 +129,7 @@ foreach (all('.')) { # $_ eq $themes{'defaut'} and $default = $themes{'defaut'}; } my %combo = ('thms' => '','lilo' => '','boot' => ''); -foreach (keys (%combo)) { +foreach (keys(%combo)) { $combo{$_} = new Gtk::Combo; $combo{$_}->set_value_in_list(1, 0); } @@ -200,7 +200,7 @@ sub { $in->ask_warn(N("Error"), N("Lilo message not found")); } #bootsplash install - if ( -f $themes{'path'} . $combo{'boot'}->entry->get_text() . $themes{'boot'}{'path'} . "bootsplash-$cur_res.jpg") { + if (-f $themes{'path'} . $combo{'boot'}->entry->get_text() . $themes{'boot'}{'path'} . "bootsplash-$cur_res.jpg") { $bootsplash_cont = "# -*- Mode: shell-script -*- # Specify here if you want add the splash logo to initrd when # generating an initrd. You can specify : @@ -237,8 +237,8 @@ LOGO_CONSOLE=" . ($keep_logo ? 'yes' : 'no') . "\n"; } #here is mkinitrd time if (!$error) { - foreach (map { if_(m|^initrd-(.*)\.img|, $1) } all('/boot')){ - if ( system("mkinitrd -f /boot/initrd-$_.img $_")) { + foreach (map { if_(m|^initrd-(.*)\.img|, $1) } all('/boot')) { + if (system("mkinitrd -f /boot/initrd-$_.img $_")) { $in->ask_warn(N("Error"), N("Can't launch mkinitrd -f /boot/initrd-%s.img %s.", $_,$_)); $error = 1; @@ -260,8 +260,8 @@ Launch \"lilo\" as root in command line to complete LiLo theme installation.")); }); gtkadd($window, - gtkpack__ (my $global_vbox = new Gtk::VBox(0,0), - gtkadd (new Gtk::Frame ("$disp_mode"), + gtkpack__(my $global_vbox = new Gtk::VBox(0,0), + gtkadd(new Gtk::Frame ("$disp_mode"), # gtkpack__(new Gtk::VBox(0,0), (gtkpack_(gtkset_border_width(new Gtk::HBox(0, 0),5), 1,N("You are currently using %s as your boot manager. @@ -321,19 +321,19 @@ Click on Configure to launch the setup wizard.", $lilogrub), # ) # ), # X - gtkadd (new Gtk::Frame (N("System mode")), - gtkpack__ (new Gtk::VBox(0, 5), + gtkadd(new Gtk::Frame (N("System mode")), + gtkpack__(new Gtk::VBox(0, 5), gtksignal_connect(gtkset_active(new Gtk::CheckButton (N("Launch the graphical environment when your system starts")), $x_mode), clicked => sub { $x_box->set_sensitive(!$x_mode); $x_mode = !$x_mode; }), - gtkpack__ (gtkset_sensitive ($x_box, $x_mode), + gtkpack__(gtkset_sensitive ($x_box, $x_mode), gtkset_active($x_no_button = new Gtk::RadioButton (N("No, I don't want autologin")), !$l_mode), - gtkpack__ (new Gtk::HBox(0, 10), + gtkpack__(new Gtk::HBox(0, 10), gtkset_active($x_yes_button = new Gtk::RadioButton((N("Yes, I want autologin with this (user, desktop)")), $x_no_button), $l_mode), - gtkpack__ (new Gtk::VBox(0, 10), - $user_combo, - $desktop_combo + gtkpack__(new Gtk::VBox(0, 10), + $user_combo, + $desktop_combo ) ) ) @@ -404,7 +404,7 @@ sub isXlaunched { } close INITTAB; $line =~ s/id:([1-6]):initdefault:/$1/; - return ($line-3); + return $line-3; } sub updateInit { @@ -454,10 +454,10 @@ sub isAutologin { } close AUTOLOGIN; $line =~ s/AUTOLOGIN=(yes|no)/$1/; - chomp ($line); + chomp($line); $line = ($line eq "yes"); my %au = get_autologin(''); - return ($line && defined $au{autologin}); + return $line && defined $au{autologin}; } sub get_autologin { diff --git a/perl-install/commands.pm b/perl-install/commands.pm index 6d478c283..f871cf6ea 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -46,7 +46,7 @@ sub basename_ { print basename(@_), "\n" } sub rmdir_ { foreach (@_) { rmdir $_ or die "rmdir: can't remove $_\n" } } sub lsmod { print "Module Size Used by\n"; cat("/proc/modules") } sub which { - ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG }} + ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG } } } sub grep_ { @@ -470,7 +470,7 @@ $dev, $size, $used, $free, $use, $mntpoint ($size, $free) = MDK::Common::System::df($mntpoint = $h{$dev}); $size or next; - $use = int (100 * ($size - $free) / $size); + $use = int(100 * ($size - $free) / $size); $used = $size - $free; if ($h) { $used = int ($used / 1024) . "M"; diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 4d4a7f702..122463ec9 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -646,7 +646,7 @@ sub Resize { } } elsif (isThisFs("reiserfs", $part)) { write_partitions($in, $hd) or return; - if (defined (my $free = fs::df($part))) { + if (defined(my $free = fs::df($part))) { $nice_resize{reiserfs} = 1; $min = max($min, $part->{size} - $free); } diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 323d868b6..92112f8b8 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -498,7 +498,7 @@ sub main { log::l("switching to newt install cuz not enough memory"); $o->{interactive} = "newt"; } - require"install_steps_$o->{interactive}.pm" if $o->{interactive}; #- no space to skip perl2fcalls + require "install_steps_$o->{interactive}.pm" if $o->{interactive}; #- needed before accessing floppy (in case of usb floppy) modules::load_category('bus/usb'); diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index 07e960b5e..b0acf407c 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -21,7 +21,7 @@ sub new { if ($o->{interactive}) { my $interactiveClass = "install_steps_$o->{interactive}"; - require"$interactiveClass.pm"; #- no space to skip perl2fcalls + require "$interactiveClass.pm"; @ISA = ($interactiveClass, @ISA); diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 2018f2d1d..671b6964d 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -576,7 +576,7 @@ sub set { #- getting the main charset mkdir "$dir/$main_charset"; mkdir "$dir/$main_charset/LC_MESSAGES"; - install_any::getAndSaveFile ("$dir/$main_charset/$_") foreach @LCs, 'LC_MESSAGES/SYS_LC_MESSAGES'; + install_any::getAndSaveFile("$dir/$main_charset/$_") foreach @LCs, 'LC_MESSAGES/SYS_LC_MESSAGES'; } mkdir "$dir/$LANG"; @@ -764,7 +764,7 @@ sub load_mo { #- cleanup eval { rm_rf($localedir) }; eval { mkdir_p(dirname("$localedir/$_/$suffix")) }; - install_any::getAndSaveFile ("$localedir/$_/$suffix"); + install_any::getAndSaveFile("$localedir/$_/$suffix"); -s $f and return $_; } @@ -801,7 +801,7 @@ sub get_x_fontset { if (! -e "$dir/$f" && $::isInstall && common::usingRamdisk()) { unlink "$dir/$_" foreach values %bigfonts; install_any::remove_bigseldom_used (); - install_any::getAndSaveFile ("$dir/$f"); + install_any::getAndSaveFile("$dir/$f"); } } my ($big, $small) = @$c[5..6]; diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 2dc9a12ad..8416d0190 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -238,9 +238,7 @@ sub write_conf { } elsif ($type eq 'alias' && $alias =~ /scsi_hostadapter|usb-interface/) { #- remove old aliases which are replaced by probeall $_ = ''; - } elsif ( - $conf{$alias}{$type} && - $conf{$alias}{$type} ne $module) { + } elsif ($conf{$alias}{$type} && $conf{$alias}{$type} ne $module) { my $v = join(' ', uniq(deref($conf{$alias}{$type}))); $_ = "$type $alias $v\n"; } diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 5cdd9ef57..ad37fbe60 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -94,7 +94,7 @@ sub pre_func { my $W = my_gtk->new(N("Network Configuration Wizard")); gtkadd($W->{window}, gtkpack_(new Gtk::VBox(0, 0), - 1, write_on_pixmap(gtkpng ("drakconnect_step"), + 1, write_on_pixmap(gtkpng("drakconnect_step"), 20,200, N("We are now going to configure the %s connection.", translate($text)), ), @@ -449,7 +449,7 @@ DOMAINNAME2=$netc->{DOMAINNAME2}" cp_af("$prefix/etc/sysconfig/network-scripts/drakconnect_conf", "$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . $a); chmod 0600, "$prefix/etc/sysconfig/network-scripts/drakconnect_conf"; chmod 0600, "$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . $a; - foreach ( ["$prefix$connect_file", "up"], + foreach (["$prefix$connect_file", "up"], ["$prefix$disconnect_file", "down"], ["$prefix$connect_prog", "prog"], ["$prefix/etc/ppp/ioptions1B", "iop1B"], @@ -473,7 +473,7 @@ sub set_profile { -e ($f . "." . $profile) or return; $netcnx->{PROFILE}=$profile; cp_af($f . "." . $profile, $f); - foreach ( ["$prefix$connect_file", "up"], + foreach (["$prefix$connect_file", "up"], ["$prefix$disconnect_file", "down"], ["$prefix$connect_prog", "prog"], ["$prefix/etc/ppp/ioptions1B", "iop1B"], diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index bdbfc4ae7..187b65db2 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -688,7 +688,7 @@ The only solution is to move your primary partitions to have the hole next to th } if ($e && $part->{start} < $e->{start}) { - my $l = first (@{$hd->{extended}}); + my $l = first(@{$hd->{extended}}); #- the first is a special case, must recompute its real size $l->{start} = round_down($l->{normal}{start} - 1, $hd->cylinder_size()); diff --git a/perl-install/partition_table/mac.pm b/perl-install/partition_table/mac.pm index 33b63aa99..131dcb72f 100644 --- a/perl-install/partition_table/mac.pm +++ b/perl-install/partition_table/mac.pm @@ -257,7 +257,7 @@ sub write($$$;$) { syswrite F, pack($dd_format, @$_{@$dd_fields}), psizeof($dd_format) or return 0; } # zero the rest of the data in the first block. - foreach ( 1 .. (494 - ((@ddstowrite) * 8))) { + foreach (1 .. (494 - ((@ddstowrite) * 8))) { syswrite F, "\0", 1 or return 0; } #c::lseek_sector(fileno(F), $sector, 512) or return 0; diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index f71ceebbc..aae42dfbd 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -474,7 +474,7 @@ sub read_rpmsrate { (?:\s+|$) )(.*)/x) { #@")) { ($t, $flag, $data) = ($1,$2,$3); - while ($flag =~ s,^\s*(("[^"]*"|[^"\s]*)*)\s+,$1,) {} + while ($flag =~ s,^\s*(("[^"]*"|[^"\s]*)*)\s+,$1,) { } my $ok = 0; $flag = join('||', grep { if (my ($inv, $p) = /^(!)?HW"(.*)"/) { @@ -1082,7 +1082,7 @@ sub install($$$;$$) { $retry_pkg = shift @transToInstall; $retry_count = 3; #- now it could be safe to display error message ? - cdie ("error installing package list: $name"); + cdie("error installing package list: $name"); } } #- check if name has been set (so that the following code has been executed already). diff --git a/perl-install/printer/detect.pm b/perl-install/printer/detect.pm index 8439f9a37..e26c0914a 100644 --- a/perl-install/printer/detect.pm +++ b/perl-install/printer/detect.pm @@ -87,7 +87,7 @@ sub whatNetPrinter { } else { if (!defined($modelinfo)) { # SNMP request to auto-detect model - $modelinfo = getSNMPModel ($ip); + $modelinfo = getSNMPModel($ip); } if (defined($modelinfo)) { push @res, { port => "socket://$host:$port", diff --git a/perl-install/printer/gimp.pm b/perl-install/printer/gimp.pm index 6d92d5fe3..bf4cab83c 100644 --- a/perl-install/printer/gimp.pm +++ b/perl-install/printer/gimp.pm @@ -105,7 +105,7 @@ sub addcupsremoteto { /^\*PPD-Adobe/)) { $ppdfile = "/etc/foomatic/$queue.ppd"; } else { - unlink ("$::prefix/etc/foomatic/$queue.ppd"); + unlink "$::prefix/etc/foomatic/$queue.ppd"; return 0; } } diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index ad525b0d6..907164ddb 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -239,7 +239,7 @@ sub read_configured_queues($) { open F, ($::testing ? $prefix : "chroot $prefix/ ") . "foomatic-configure -P -q -s $spooler |" or die "Could not run foomatic-configure"; - eval (join('',(<F>))); + eval join('',(<F>)); close F; if ($service eq "pdq") { #- Have we found queues? PDQ has no damon, so we consider @@ -260,7 +260,7 @@ sub read_configured_queues($) { open F, ($::testing ? $prefix : "chroot $prefix/ ") . "foomatic-configure -P -q -s $printer->{SPOOLER} |" or die "Could not run foomatic-configure"; - eval (join('',(<F>))); + eval join('',(<F>)); close F; } $printer->{configured} = {}; @@ -524,7 +524,7 @@ sub read_foomatic_options ($) { " $printer->{SPECIAL_OPTIONS}" : "") . " |" or die "Could not run foomatic-configure"; - eval (join('',(<F>))); + eval join('',(<F>)); close F; # Return the arguments field return $COMBODATA->{args}; @@ -1337,7 +1337,7 @@ sub configure_hpoj { $bus = "par"; $address_arg = printer::detect::parport_addr($device); $address_arg =~ /^\s*-base\s+(\S+)/; - eval ("$base_address = $1"); + eval "$base_address = $1"; } elsif ($device =~ /socket/) { $bus = "hpjd"; $hostname = $model; @@ -1399,7 +1399,7 @@ sub configure_hpoj { close F; chomp $serialnumber_long; } - if (cardReaderDetected ($ptalprobedevice)) { + if (cardReaderDetected($ptalprobedevice)) { $cardreader = 1; } } @@ -1441,7 +1441,7 @@ sub configure_hpoj { } # Delete any old/conflicting devices - deleteDevice ($ptaldevice); + deleteDevice($ptaldevice); if ($bus eq "par") { while (1) { my $oldDevname = lookupDevname ("mlc:par:",undef,undef, @@ -1449,7 +1449,7 @@ sub configure_hpoj { if (!defined($oldDevname)) { last; } - deleteDevice ($oldDevname); + deleteDevice($oldDevname); } } @@ -1575,7 +1575,7 @@ sub configure_hpoj { "init.photod.append+=-maxaltports 26\n"; } close(CONFIG); - readOneDevice ($ptaldevice); + readOneDevice($ptaldevice); # Restart HPOJ printer::services::restart("hpoj"); @@ -1661,7 +1661,7 @@ RIGHTDRIVE=\" \" sub configureapplications { my ($printer) = @_; - setcupslink ($printer); + setcupslink($printer); printer::office::configureoffice('Star Office', $printer); printer::office::configureoffice('OpenOffice.Org', $printer); printer::gimp::configure($printer); @@ -1669,23 +1669,23 @@ sub configureapplications { sub addcupsremotetoapplications { my ($printer, $queue) = @_; - setcupslink ($printer); - return (printer::office::add_cups_remote_to_office('Star Office', $printer, $queue) && - printer::office::add_cups_remote_to_office('OpenOffice.Org', $printer, $queue) && - printer::gimp::addcupsremoteto($printer, $queue)); + setcupslink($printer); + return printer::office::add_cups_remote_to_office('Star Office', $printer, $queue) && + printer::office::add_cups_remote_to_office('OpenOffice.Org', $printer, $queue) && + printer::gimp::addcupsremoteto($printer, $queue); } sub removeprinterfromapplications { my ($printer, $queue) = @_; - setcupslink ($printer); - return (printer::office::remove_printer_from_office('Star Office', $printer, $queue) && - printer::office::remove_printer_from_office('OpenOffice.Org', $printer, $queue) && - printer::gimp::removeprinterfrom($printer, $queue)); + setcupslink($printer); + return printer::office::remove_printer_from_office('Star Office', $printer, $queue) && + printer::office::remove_printer_from_office('OpenOffice.Org', $printer, $queue) && + printer::gimp::removeprinterfrom($printer, $queue); } sub removelocalprintersfromapplications { my ($printer) = @_; - setcupslink ($printer); + setcupslink($printer); printer::office::remove_local_printers_from_office('Star Office', $printer); printer::office::remove_local_printers_from_office('OpenOffice.Org', $printer); printer::gimp::removelocalprintersfrom($printer); diff --git a/perl-install/printer/office.pm b/perl-install/printer/office.pm index 037d40601..d5be027cf 100644 --- a/perl-install/printer/office.pm +++ b/perl-install/printer/office.pm @@ -144,7 +144,7 @@ sub add_cups_remote_to_office { $configprefix, $configfilecontent); } else { - unlink ("$::prefix/etc/foomatic/$queue.ppd"); + unlink "$::prefix/etc/foomatic/$queue.ppd"; return 0; } last if $suite eq 'Star Office'; diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 57e57fe28..97f1f00d7 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -689,7 +689,7 @@ complete => sub { # Auto-detect printer model (works if host is an ethernet-connected # printer) - my $modelinfo = printer::detect::getSNMPModel ($remotehost); + my $modelinfo = printer::detect::getSNMPModel($remotehost); my $auto_hpoj; if ((defined($modelinfo)) && ($modelinfo->{MANUFACTURER} ne "") && @@ -707,7 +707,7 @@ complete => sub { "$modelinfo->{MANUFACTURER} $modelinfo->{MODEL}", $printer->{currentqueue}{connect}, $auto_hpoj, ({port => $printer->{currentqueue}{connect}, - val => $modelinfo})); + val => $modelinfo })); 1; } @@ -1119,7 +1119,7 @@ sub setup_socket { # Auto-detect printer model my $modelinfo; if ($printer->{AUTODETECT}) { - $modelinfo = printer::detect::getSNMPModel ($remotehost); + $modelinfo = printer::detect::getSNMPModel($remotehost); } my $auto_hpoj; if ((defined($modelinfo)) && @@ -1206,7 +1206,7 @@ complete => sub { # Auto-detect printer model (works if host is an ethernet-connected # printer) my $remotehost = $1; - my $modelinfo = printer::main::getSNMPModel ($remotehost); + my $modelinfo = printer::main::getSNMPModel($remotehost); my $auto_hpoj; if ((defined($modelinfo)) && ($modelinfo->{MANUFACTURER} ne "") && @@ -1580,7 +1580,7 @@ sub get_db_entry { $model =~ s/PS//; $model =~ s/PostScript//; $model =~ s/Series//; - for $key (keys %printer::main::thedb) { + foreach my $key (keys %printer::main::thedb) { if ((($::expert) && ($key =~ /^$make\|$model\|.*\(recommended\)$/)) || ((!$::expert) && ($key =~ /^$make\|$model$/))) { $printer->{DBENTRY} = $key; @@ -1656,7 +1656,7 @@ sub choose_model { $printer->{DBENTRY} = N("Raw printer (No driver)"); } # Choose the printer/driver from the list - return ($printer->{DBENTRY} = $in->ask_from_treelist(N("Printer model selection"), + return($printer->{DBENTRY} = $in->ask_from_treelist(N("Printer model selection"), N("Which printer model do you have?") . N(" @@ -2058,8 +2058,8 @@ You should make sure that the page size and the ink type/printing mode (if avail } } } - return (0); - } ); + return 0; + }); } # Read out the user's choices and generate the appropriate command # line arguments @@ -2238,7 +2238,7 @@ It may take some time before the printer starts.\n"); and return 1; } } else { - return ($::isWizard ? $res1 : 1); + return($::isWizard ? $res1 : 1); } return 2; } @@ -2418,7 +2418,7 @@ sub copy_queues_from { foreach (@oldqueues) { push (@queuesselected, 1); push (@queueentries, { text => $_, type => 'bool', - val => \$queuesselected[$#queuesselected] } ); + val => \$queuesselected[$#queuesselected] }); } # LPRng and LPD use the same config files, therefore one sees the # queues of LPD when one uses LPRng and vice versa, but these queues diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 44fe12899..07a966cc6 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -46,7 +46,7 @@ sub raw { return 1 if $root && $<; $root ? $root .= '/' : ($root = ''); - install_any::check_prog (ref $name ? $name->[0] : $name) if !$root && $::isInstall; + install_any::check_prog(ref $name ? $name->[0] : $name) if !$root && $::isInstall; my ($stdout_raw, $stdout_mode, $stderr_raw, $stderr_mode); diff --git a/perl-install/security/main.pm b/perl-install/security/main.pm index 73ba86472..03c49bda3 100644 --- a/perl-install/security/main.pm +++ b/perl-install/security/main.pm @@ -112,7 +112,7 @@ sub draksec_main { my @all_choices = (@yesno_choices, @alllocal_choices); my %options_values; - foreach ( [ 'network', N("Network Options") ], [ 'system', N("System Options") ] ) { + foreach ([ 'network', N("Network Options") ], [ 'system', N("System Options") ]) { my ($domain, $label) = @$_; my %values; diff --git a/perl-install/services.pm b/perl-install/services.pm index 3348b2bf6..0a628163f 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -231,7 +231,7 @@ sub ask_standalone_gtk { push @$on_services, $service if !member($service, @$on_services); } else { @$on_services = grep { $_ ne $service } @$on_services; - }}), member($service, @$on_services))), + } }), member($service, @$on_services))), map { my $a = $_; gtkpack__(new Gtk::HBox(0,0), gtksignal_connect(new Gtk::Button(translate($a)), clicked => sub { my $c = "service $service " . (lc($a) eq "start" ? "restart" : lc($a)) . " 2>&1"; local $_ = `$c`; s/\033\[[^mG]*[mG]//g; diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 9c0bcfbab..5b82724a7 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -159,10 +159,10 @@ sub ask_for_X_restart { open STDOUT, ">/dev/null"; open STDERR, ">&STDERR"; c::setsid(); - exec qw(perl -e), q{ + exec qw(perl -e), q( my ($wm, $pid) = @ARGV; my $nb; for ($nb = 30; $nb && -e "/proc/$pid"; $nb--) { sleep 1 } system("killall X") if $nb; - }, $wm, $pid; + ), $wm, $pid; } diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index 49a0a7ab6..2e100ede9 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -410,7 +410,7 @@ sub create_treeitem { my $w = new Gtk::TreeItem($name); $w->signal_connect(key_press_event => sub { my (undef, $e) = @_; - local $_ = chr ($e->{keyval}); + local $_ = chr $e->{keyval}; if ($e->{keyval} > 0x100) { my $n; @@ -736,7 +736,7 @@ sub gtkpowerpack { ref($_[0]) eq 'HASH' || ref($_[0]) eq 'ARRAY' and $RefAttrs = shift; foreach ("expand", "fill", "padding", "pack_end") { if ($RefDefaultAttrs->{$_} eq 'arg') { - ref ($_[0]) and die "error in packing definition\n"; + ref $_[0] and die "error in packing definition\n"; $attr{$_} = shift; ref($RefAttrs) eq 'ARRAY' and shift @$RefAttrs; } elsif (ref($RefAttrs) eq 'HASH' && defined($RefAttrs->{$_})) { |