diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-04 21:22:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-04 21:22:16 +0000 |
commit | 868f8ef6acc35e7f402f082fb8398c22bbd012b5 (patch) | |
tree | 97085cdd1bd58872e282d0d5675bec7dd2c1af0f /perl-install | |
parent | 987b89760dd7090ecf49bd225c634bcf7503d18c (diff) | |
download | drakx-backup-do-not-use-868f8ef6acc35e7f402f082fb8398c22bbd012b5.tar drakx-backup-do-not-use-868f8ef6acc35e7f402f082fb8398c22bbd012b5.tar.gz drakx-backup-do-not-use-868f8ef6acc35e7f402f082fb8398c22bbd012b5.tar.bz2 drakx-backup-do-not-use-868f8ef6acc35e7f402f082fb8398c22bbd012b5.tar.xz drakx-backup-do-not-use-868f8ef6acc35e7f402f082fb8398c22bbd012b5.zip |
remove unused variables or rename them with an underscore (eg: $o becomes $_o)
Diffstat (limited to 'perl-install')
65 files changed, 255 insertions, 292 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm index adca31e0e..6baa84f78 100644 --- a/perl-install/Xconfig/main.pm +++ b/perl-install/Xconfig/main.pm @@ -54,7 +54,7 @@ sub configure_everything { $options->{VideoRam_probed} = $X->{monitor}{VideoRam_probed}; $ok &&= $X->{card} = Xconfig::card::configure($in, $raw_X, $do_pkgs, $auto, $options); $ok &&= Xconfig::screen::configure($raw_X, $X->{card}); - $ok &&= $X->{resolution} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitor}, $auto); + $ok &&= $X->{resolution} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitor}); $ok &&= Xconfig::test::test($in, $raw_X, $X->{card}, $auto, 'skip_badcard'); if (!$ok) { diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm index 8038818cd..3d9415dff 100644 --- a/perl-install/Xconfig/monitor.pm +++ b/perl-install/Xconfig/monitor.pm @@ -161,7 +161,7 @@ sub getinfoFromDDC { push @Modes, [ $x, $y, $depth ]; } - my ($h, $v, $size, @m) = @l; + my ($h, $v, $size, @_modes) = @l; { VideoRam_probed => to_int($VideoRam), HorizSync => first($h =~ /^(\S*)/), diff --git a/perl-install/Xconfig/parse.pm b/perl-install/Xconfig/parse.pm index 0099b4666..a2e662009 100644 --- a/perl-install/Xconfig/parse.pm +++ b/perl-install/Xconfig/parse.pm @@ -35,7 +35,6 @@ sub raw_from_file { #- internal $lines ||= [ cat_($file) ]; my $line; - my $weird = sub { warn "$file:$line: strange $_[0]" }; my ($comment, $obj, @objs); @@ -81,7 +80,7 @@ sub raw_from_file { #- internal } elsif (/^EndSubsection/i) { die "$file:$line: not in Subsection\n" if !@objs || $objs[0]{kind} ne 'Subsection'; $attach_comment->('post'); - my $e = shift @objs; $obj = ''; + shift @objs; $obj = ''; } else { die "$file:$line: not in Section\n" if !@objs; diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm index daeac5806..f3d7769a3 100644 --- a/perl-install/Xconfig/resolution_and_depth.pm +++ b/perl-install/Xconfig/resolution_and_depth.pm @@ -138,7 +138,7 @@ sub choose { sub choices { - my ($raw_X, $resolution_wanted, $card, $monitor) = @_; + my ($_raw_X, $resolution_wanted, $card, $monitor) = @_; $resolution_wanted ||= {}; my ($prefered_depth, @resolutions) = allowed($card); @@ -169,7 +169,7 @@ sub choices { } sub configure { - my ($in, $raw_X, $card, $monitor, $auto) = @_; + my ($in, $raw_X, $card, $monitor) = @_; my ($default_resolution, @resolutions) = choices($raw_X, $raw_X->get_resolution, $card, $monitor); diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm index 307c0ff7a..4fafaafa8 100644 --- a/perl-install/Xconfig/test.pm +++ b/perl-install/Xconfig/test.pm @@ -26,7 +26,6 @@ sub test { return 1 if $skip_badcard && $bad_card; if ($bad_card || !$auto) { - my $msg = $in->ask_yesorno(N("Test of the configuration"), N("Do you want to test the configuration?") . ($bad_card ? "\n" . N("Warning: testing this graphic card may freeze your computer") : ''), !$bad_card) or return 1; @@ -64,7 +63,7 @@ sub test { do { sleep 1 } until xtest(":9") || waitpid($pid, c::WNOHANG()); - my $b = before_leaving { unlink $f_err }; + my $_b = before_leaving { unlink $f_err }; if (!xtest(":9")) { open(my $F, $f_err); diff --git a/perl-install/Xconfig/xfree4.pm b/perl-install/Xconfig/xfree4.pm index 88cad5b06..7dd57dab1 100644 --- a/perl-install/Xconfig/xfree4.pm +++ b/perl-install/Xconfig/xfree4.pm @@ -123,7 +123,7 @@ sub new_screen_sections { } sub set_Option { - my ($raw_X, $category, $node, @names) = @_; + my ($_raw_X, $category, $node, @names) = @_; if (member($category, 'keyboard', 'mouse')) { #- everything we export is an Option diff --git a/perl-install/any.pm b/perl-install/any.pm index 9e0d58139..26e4343d9 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -56,7 +56,6 @@ sub allocUsers { sub addUsers { my ($prefix, $users) = @_; - my $msec = "$prefix/etc/security/msec"; allocUsers($prefix, $users); foreach my $u (@$users) { @@ -278,7 +277,6 @@ You can add some more or change the existing ones."), $e->{label} = $prefix; for (my $nb = 0; member($e->{label}, @labels); $nb++) { $e->{label} = "$prefix-$nb" } } - my %old_e = %$e; my $default = my $old_default = $e->{label} eq $b->{default}; my @l; @@ -358,7 +356,7 @@ sub pack_passwd { } sub get_autologin { - my ($o) = @_; + my ($_o) = @_; my %l = getVarsFromSh("$::prefix/etc/sysconfig/autologin"); my %desktop = getVarsFromSh("$::prefix/etc/sysconfig/desktop"); { autologin => text2bool($l{AUTOLOGIN}) && $l{USER}, desktop => $desktop{DESKTOP} }; @@ -711,7 +709,7 @@ not cause any damage.", $module_descr)), [ N_("Autoprobe"), N_("Specify options" } while (1) { eval { - my $w = wait_load_module($in, $category, $module_descr, $module); + my $_w = wait_load_module($in, $category, $module_descr, $module); log::l("user asked for loading module $module (type $category, desc $module_descr)"); modules::load([ $module, @$options ]); }; @@ -730,7 +728,6 @@ sub ask_users { my $u if 0; $u ||= {}; - my @shells = map { chomp; $_ } cat_("$prefix/etc/shells"); my @icons = facesnames($prefix); my %high_security_groups = ( @@ -973,7 +970,6 @@ sub fileshare_config { if (@wanted == 1) { $in->ask_okcancel('', N("The package %s needs to be installed. Do you want to install it?", $type2file{$wanted[0]}[1]), 1) or return; } else { - my %choices; my $wanted = $in->ask_many_from_list('', N("You can export using NFS or Samba. Please select which you'd like to use."), { list => \@wanted }) or return; @wanted = @$wanted or return; @@ -1052,7 +1048,6 @@ sub config_security_user { sub choose_security_level { my ($in, $security, $libsafe, $email) = @_; - my $expert_file = "/etc/security/msec/expert_mode"; my %l = ( 0 => N("Welcome To Crackers"), diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 952c54d4b..e2ba67f29 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -79,7 +79,7 @@ sub mkbootdisk { sub read() { my $file = sprintf("/etc/%s.conf", arch() =~ /sparc/ ? 'silo' : arch() =~ /ppc/ ? 'yaboot' : 'lilo'); my $global = 1; - my ($e, $v, $f); + my ($e, $v); my %b; foreach (cat_("$::prefix$file")) { next if /^\s*#/ || /^\s*$/; @@ -601,7 +601,7 @@ sub get_of_dev { } sub install_yaboot { - my ($lilo, $fstab, $hds) = @_; + my ($lilo, $_fstab, $_hds) = @_; $lilo->{prompt} = $lilo->{timeout}; if ($lilo->{message}) { @@ -678,7 +678,7 @@ sub install_yaboot { sub install_silo { my ($silo, $fstab) = @_; my $boot = fsedit::get_root($fstab, 'boot')->{device}; - my ($wd, $num) = $boot =~ /^(.*\D)(\d*)$/; + my ($wd, $_num) = $boot =~ /^(.*\D)(\d*)$/; #- setup boot promvars for. require c; @@ -764,7 +764,7 @@ sub write_lilo_conf { (my $part, $file) = fsedit::file2part($fstab, $file); my %hds = map_index { $_ => "hd$::i" } map { $_->{device} } sort { isFat($b) <=> isFat($a) || $a->{device} cmp $b->{device} } fsedit::get_fstab(@$hds); - $hds->{$part->{device}} . ":" . $file; + $hds{$part->{device}} . ":" . $file; } else { $file } @@ -967,8 +967,6 @@ sub write_grub_config { } } } - my $hd = fsedit::get_root($fstab, 'boot')->{rootDevice}; - my $dev = dev2grub($lilo->{first_hd_device} || $lilo->{boot}, \%dev2bios); my ($s1, $s2, $m) = map { $file2grub->("/boot/grub/$_") } qw(stage1 stage2 menu.lst); my $f = "/boot/grub/install.sh"; @@ -1048,7 +1046,7 @@ sub install_loadlin { my $windrive = $winhandle->{dir}; log::l("windrive is $windrive"); - my ($label, $cmd) = loadlin_cmd($lilo); + my ($_label, $cmd) = loadlin_cmd($lilo); #install_loadlin_config_sys($lilo, $windrive, $label, $cmd); #install_loadlin_desktop($lilo, $windrive); diff --git a/perl-install/commands.pm b/perl-install/commands.pm index aba586d60..9e1d9b95c 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -93,7 +93,7 @@ sub umount { } sub mkdir_ { - my ($rec) = getopts(\@_, qw(p)); + my ($_rec) = getopts(\@_, qw(p)); mkdir_p($_) foreach @_; } @@ -105,7 +105,7 @@ sub mknod { } elsif (@_ == 4) { require c; my $mode = ${{ "b" => c::S_IFBLK(), "c" => c::S_IFCHR() }}{$_[1]} or die "unknown node type $_[1]\n"; - syscall_('mknod', my $a = $_[0], $mode | 0600, makedev($_[2], $_[3])) or die "mknod failed: $!\n"; + syscall_('mknod', my $_a = $_[0], $mode | 0600, makedev($_[2], $_[3])) or die "mknod failed: $!\n"; } else { die "usage: mknod <path> [b|c] <major> <minor> or mknod <path>\n" } } diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 3d97a13b4..f6a22c5f1 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -12,7 +12,7 @@ sub size { my ($dev) = @_; sysopen(my $F, $dev, 0) or log::l("open $dev: $!"), return 0; - my $valid_offset = sub { sysseek($F, $_[0], 0) && sysread($F, my $a, 1) }; + my $valid_offset = sub { sysseek($F, $_[0], 0) && sysread($F, my $_a, 1) }; #- first try getting the size nicely if (my $size = c::total_sectors(fileno $F)) { @@ -41,7 +41,7 @@ sub find_free_loop { foreach (0..7) { my $dev = make("loop$_"); sysopen(my $F, $dev, 2) or next; - !ioctl($F, c::LOOP_GET_STATUS(), my $tmp) && $! == 6 or next; #- 6 == ENXIO + !ioctl($F, c::LOOP_GET_STATUS(), my $_tmp) && $! == 6 or next; #- 6 == ENXIO return $dev; } die "no free loop found"; diff --git a/perl-install/diskdrake/dav.pm b/perl-install/diskdrake/dav.pm index 4b19cf246..e393cd822 100644 --- a/perl-install/diskdrake/dav.pm +++ b/perl-install/diskdrake/dav.pm @@ -79,7 +79,7 @@ sub try { } sub ask_server { - my ($in, $dav, $all_hds) = @_; + my ($in, $dav, $_all_hds) = @_; my $server = $dav->{device}; $in->ask_from('', N("Please enter the WebDAV server URL"), diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 9ccfb3da4..1db5a6c6d 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -66,7 +66,7 @@ sub main { gtkadd($w->{window}, gtkpack_(Gtk2::VBox->new(0,7), - 0, (my $filesystems_button_box = filesystems_button_box()), + 0, filesystems_button_box(), 1, (my $notebook_widget = Gtk2::Notebook->new), 0, (my $per_kind_action_box = Gtk2::HBox->new(0,0)), 0, (my $general_action_box = Gtk2::HBox->new(0,0)), @@ -209,7 +209,7 @@ sub per_entry_info_box { } sub current_kind_changed { - my ($in, $kind) = @_; + my ($_in, $kind) = @_; $_->widget->destroy foreach $kind->{display_box}->children; @@ -233,7 +233,6 @@ sub current_entry_changed { sub create_automatic_notebooks { my ($notebook_widget) = @_; - my @l = fsedit::all_hds($all_hds); $_->{marked} = 0 foreach @notebook; my $may_add = sub { diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 9761e59c5..599991db6 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -230,7 +230,7 @@ sub general_possible_actions { sub Undo { - my ($in, $all_hds) = @_; + my ($_in, $all_hds) = @_; fsedit::undo($all_hds); } @@ -266,7 +266,7 @@ sub Done { # per-hd actions ################################################################################ sub hd_possible_actions { - my ($in, $hd, $all_hds) = @_; + my ($_in, $hd, $_all_hds) = @_; ( if_(!$hd->{readonly} || $hd->{getting_rid_of_readonly_allowed}, N_("Clear all")), if_(!$hd->{readonly} && $::isInstall, N_("Auto allocate")), @@ -274,7 +274,7 @@ sub hd_possible_actions { ); } sub hd_possible_actions_interactive { - my ($in, $hd, $all_hds) = @_; + my ($_in, $_hd, $_all_hds) = @_; &hd_possible_actions, N_("Hard drive information"); } @@ -370,7 +370,7 @@ All data on this floppy will be lost"), 1) && devices::make(detect_devices::flop sub Rescuept { my ($in, $hd) = @_; - my $w = $in->wait_message('', N("Trying to rescue partition table")); + my $_w = $in->wait_message('', N("Trying to rescue partition table")); fsedit::rescuept($hd); } @@ -384,7 +384,7 @@ sub Hd_info { ################################################################################ sub part_possible_actions { - my ($in, $hd, $part, $all_hds) = @_; + my ($_in, $hd, $part, $_all_hds) = @_; $part or return; my %actions = my @l = ( @@ -442,7 +442,7 @@ sub Create { my $mb_size = $part->{size} >> 11; my $has_startsector = ($::expert || arch() !~ /i.86/) && !isLVM($hd); - my $w = $in->ask_from(N("Create a new partition"), '', + $in->ask_from(N("Create a new partition"), '', [ if_($has_startsector, { label => N("Start sector: "), val => \$part->{start}, min => $def_start, max => ($max - min_partition_size($hd)), type => 'range' }, @@ -545,7 +545,7 @@ sub Type { my $type = $type_name && name2type($type_name); if (isExt2($part) && isThisFs('ext3', { type => $type })) { - my $w = $in->wait_message('', N("Switching from ext2 to ext3")); + my $_w = $in->wait_message('', N("Switching from ext2 to ext3")); if (run_program::run("tune2fs", "-j", devices::make($part->{device}))) { $part->{type} = $type; $part->{isFormatted} = 1; #- assume that if tune2fs works, partition is formatted @@ -627,7 +627,7 @@ sub Resize { if (isFat($part)) { write_partitions($in, $hd) or return; #- try to resize without losing data - my $w = $in->wait_message(N("Resizing"), N("Computing FAT filesystem bounds")); + my $_w = $in->wait_message(N("Resizing"), N("Computing FAT filesystem bounds")); $nice_resize{fat} = resize_fat::main->new($part->{device}, devices::make($part->{device})); $min = max($min, $nice_resize{fat}->min_size); @@ -685,7 +685,7 @@ sub Resize { $hd->adjustEnd($part); undef $@; - my $b = before_leaving { $@ and $part->{size} = $oldsize }; + my $_b = before_leaving { $@ and $part->{size} = $oldsize }; my $w = $in->wait_message(N("Resizing"), ''); if (isLVM($hd)) { @@ -730,7 +730,7 @@ sub Move { N("Which sector do you want to move it to?")); defined $start2 or return; - my $w = $in->wait_message(N("Moving"), N("Moving partition...")); + my $_w = $in->wait_message(N("Moving"), N("Moving partition...")); fsedit::move($hd, $part, $hd2, $start2); } sub Format { @@ -743,7 +743,7 @@ sub Mount { fs::mount_part($part); } sub Add2RAID { - my ($in, $hd, $part, $all_hds) = @_; + my ($in, $_hd, $part, $all_hds) = @_; my $raids = $all_hds->{raids}; local $_ = @$raids == () ? "new" : @@ -785,15 +785,15 @@ sub Add2LVM { lvm::update_size($lvm); } sub Unmount { - my ($in, $hd, $part) = @_; + my ($_in, $_hd, $part) = @_; fs::umount_part($part); } sub RemoveFromRAID { - my ($in, $hd, $part, $all_hds) = @_; + my ($_in, $_hd, $part, $all_hds) = @_; raid::removeDisk($all_hds->{raids}, $part); } sub RemoveFromLVM { - my ($in, $hd, $part, $all_hds) = @_; + my ($_in, $_hd, $part, $all_hds) = @_; my $lvms = $all_hds->{lvms}; isPartOfLVM($part) or die; my ($lvm) = grep { $_->{VG_name} eq $part->{lvm} } @$lvms; @@ -801,7 +801,7 @@ sub RemoveFromLVM { @$lvms = grep { $_ != $lvm } @$lvms; } sub ModifyRAID { - my ($in, $hd, $part, $all_hds) = @_; + my ($in, $_hd, $part, $all_hds) = @_; modifyRAID($in, $all_hds->{raids}, $part->{raid}); } sub Loopback { @@ -1028,7 +1028,7 @@ sub write_partitions { } sub unmount { - my ($hd, $part) = @_; + my ($_hd, $part) = @_; fs::umount_part($part); } sub format_ { @@ -1036,7 +1036,7 @@ sub format_ { write_partitions($in, $_) or return foreach isRAID($part) ? @{$all_hds->{hds}} : $hd; ask_alldatawillbelost($in, $part, N_("After formatting partition %s, all data on this partition will be lost")) or return; $part->{isFormatted} = 0; #- force format; - my $w = $in->wait_message(N("Formatting"), + my $_w = $in->wait_message(N("Formatting"), isLoopback($part) ? N("Formatting loopback file %s", $part->{loopback_file}) : N("Formatting partition %s", $part->{device})); fs::format_part($all_hds->{raids}, $part); @@ -1059,7 +1059,7 @@ sub need_migration { } sub migrate_files { - my ($in, $hd, $part, $all_hds) = @_; + my ($in, $_hd, $part, $_all_hds) = @_; my $wait = $in->wait_message('', N("Moving files to the new partition")); my $handle = any::inspect($part, '', 'rw'); diff --git a/perl-install/diskdrake/removable.pm b/perl-install/diskdrake/removable.pm index f0222d10e..939e61283 100644 --- a/perl-install/diskdrake/removable.pm +++ b/perl-install/diskdrake/removable.pm @@ -29,7 +29,7 @@ sub actions { } sub done { - my ($in, $raw_hd, $all_hds) = @_; + my ($in, $_raw_hd, $all_hds) = @_; diskdrake::interactive::Done($in, $all_hds); } sub options { diff --git a/perl-install/diskdrake/smbnfs_gtk.pm b/perl-install/diskdrake/smbnfs_gtk.pm index 4b1eee633..7bf184afe 100644 --- a/perl-install/diskdrake/smbnfs_gtk.pm +++ b/perl-install/diskdrake/smbnfs_gtk.pm @@ -60,7 +60,7 @@ sub raw_hd_mount_point { } sub per_entry_info_box { - my ($box, $kind, $entry) = @_; + my ($box, $_kind, $entry) = @_; $_->isa('Gtk2::Button') or $_->destroy foreach map { $_->widget } $box->children; my $info; if ($entry) { diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 7ad3d0949..d6445596b 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -358,7 +358,7 @@ sub mount_options_unpack { } sub mount_options_pack_ { - my ($part, $options, $unknown) = @_; + my ($_part, $options, $unknown) = @_; my ($non_defaults, $user_implies) = mount_options(); my @l; @@ -665,7 +665,7 @@ sub formatMount_all { #- that way, when install exits via ctrl-c, it gives hand to partition eval { local $SIG{__DIE__} = 'ignore'; - my ($type, $major, $minor) = devices::entry(fsedit::get_root($fstab)->{device}); + my ($_type, $major, $minor) = devices::entry(fsedit::get_root($fstab)->{device}); output "/proc/sys/kernel/real-root-dev", makedev($major, $minor); }; } diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 731824dd5..9f244e873 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -458,7 +458,7 @@ sub suggest_part { my $has_swap = grep { isSwap($_) } get_all_fstab($all_hds); - my ($best, $second) = + my ($best) = grep { !$_->{maxsize} || $part->{size} <= $_->{maxsize} } grep { $_->{size} <= ($part->{maxsize} || $part->{size}) } grep { !has_mntpoint($_->{mntpoint}, $all_hds) || isSwap($_) && !$has_swap } @@ -497,7 +497,7 @@ sub get_root { &get_root_ || {} } #- do this before modifying $part->{type} sub check_type { - my ($type, $hd, $part) = @_; + my ($type, $_hd, $part) = @_; isThisFs("jfs", { type => $type }) && $part->{size} < 16 << 11 and die N("You can't use JFS for partitions smaller than 16MB"); isThisFs("reiserfs", { type => $type }) && $part->{size} < 32 << 11 and die N("You can't use ReiserFS for partitions smaller than 32MB"); } @@ -595,7 +595,7 @@ sub auto_allocate { if ($before == listlength(fsedit::get_all_fstab($all_hds))) { # find out why auto_allocate failed - if (my @l = grep { !has_mntpoint($_->{mntpoint}, $all_hds) } @$suggestions_) { + if (grep { !has_mntpoint($_->{mntpoint}, $all_hds) } @$suggestions_) { die N("Not enough free space for auto-allocating"); } else { die N("Nothing to do"); diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm index a04f8db87..05e892c62 100644 --- a/perl-install/ftp.pm +++ b/perl-install/ftp.pm @@ -41,7 +41,7 @@ sub new { $ftp->binary; $ftp->cwd($prefix); - my @l = ($ftp, \ (my $retr)); + my @l = ($ftp, \ (my $_retr)); $hosts{"$host$prefix"} = \@l; @l; } }; diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 3025abc9f..78296fff0 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -85,7 +85,7 @@ sub installStepsCall { #------------------------------------------------------------------------------ sub selectLanguage { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $ent_number, $auto) = @_; installStepsCall($o, $auto, 'selectLanguage', $ent_number == 1); installStepsCall($o, $auto, 'acceptLicence'); @@ -105,7 +105,7 @@ sub selectMouse { #------------------------------------------------------------------------------ sub setupSCSI { - my ($clicked, $ent_number, $auto) = @_; + my ($clicked, $_ent_number, $auto) = @_; if (!$::live && !$::g_auto_install && !$o->{blank} && !$::testing && !$::uml_install) { -s modules::cz_file() or die N("Can't access kernel modules corresponding to your kernel (file %s is missing), this generally means your boot floppy in not in sync with the Installation medium (please create a newer boot floppy)", modules::cz_file()); @@ -116,7 +116,7 @@ sub setupSCSI { #------------------------------------------------------------------------------ sub selectKeyboard { - my ($clicked, $first_time, $auto) = ($_[0], $_[1] == 1, $_[2]); + my ($clicked, $_ent_number, $auto) = @_; installStepsCall($o, $auto, 'selectKeyboard', $clicked); @@ -131,7 +131,7 @@ sub selectKeyboard { #------------------------------------------------------------------------------ sub selectInstallClass { - my ($clicked, $ent_number, $auto) = @_; + my ($clicked, $_ent_number, $auto) = @_; installStepsCall($o, $auto, 'selectInstallClass', $clicked); @@ -148,7 +148,7 @@ sub selectInstallClass { #------------------------------------------------------------------------------ sub doPartitionDisks { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $_ent_number, $auto) = @_; $o->{steps}{formatPartitions}{done} = 0; installStepsCall($o, $auto, 'doPartitionDisksBefore'); installStepsCall($o, $auto, 'doPartitionDisks'); @@ -156,7 +156,7 @@ sub doPartitionDisks { } sub formatPartitions { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $_ent_number, $auto) = @_; $o->{steps}{choosePackages}{done} = 0; installStepsCall($o, $auto, 'choosePartitionsToFormat', $o->{fstab}) if !$o->{isUpgrade}; @@ -195,7 +195,7 @@ sub formatPartitions { #------------------------------------------------------------------------------ sub choosePackages { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $ent_number, $auto) = @_; require pkgs; #- always setPackages as it may have to copy hdlist files and synthesis files. @@ -212,7 +212,7 @@ sub choosePackages { #------------------------------------------------------------------------------ sub installPackages { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $ent_number, $auto) = @_; installStepsCall($o, $auto, 'readBootloaderConfigBeforeInstall') if $ent_number == 1; @@ -222,7 +222,7 @@ sub installPackages { } #------------------------------------------------------------------------------ sub miscellaneous { - my ($clicked, $ent_number, $auto) = @_; + my ($clicked, $_ent_number, $auto) = @_; installStepsCall($o, $auto, 'miscellaneousBefore', $clicked); installStepsCall($o, $auto, 'miscellaneous', $clicked); @@ -231,7 +231,7 @@ sub miscellaneous { #------------------------------------------------------------------------------ sub summary { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $ent_number, $auto) = @_; installStepsCall($o, $auto, 'summary', $ent_number == 1); } #------------------------------------------------------------------------------ @@ -244,22 +244,22 @@ sub configureNetwork { } #------------------------------------------------------------------------------ sub installCrypto { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $_ent_number, $auto) = @_; installStepsCall($o, $auto, 'installCrypto'); } #------------------------------------------------------------------------------ sub installUpdates { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $_ent_number, $auto) = @_; installStepsCall($o, $auto, 'installUpdates'); } #------------------------------------------------------------------------------ sub configureServices { - my ($clicked, $ent_number, $auto) = @_; + my ($clicked, $_ent_number, $auto) = @_; installStepsCall($o, $auto, 'configureServices', $clicked); } #------------------------------------------------------------------------------ sub setRootPassword { - my ($clicked, $ent_number, $auto) = @_; + my ($clicked, $_ent_number, $auto) = @_; return if $o->{isUpgrade}; installStepsCall($o, $auto, 'setRootPassword', $clicked); @@ -267,7 +267,7 @@ sub setRootPassword { } #------------------------------------------------------------------------------ sub addUser { - my ($clicked, $ent_number, $auto) = @_; + my ($clicked, $_ent_number, $auto) = @_; return if $o->{isUpgrade} && !$clicked; installStepsCall($o, $auto, 'addUser', $clicked); @@ -298,7 +298,7 @@ sub setupBootloader { } #------------------------------------------------------------------------------ sub configureX { - my ($clicked, $ent_number, $auto) = @_; + my ($clicked, $_ent_number, $auto) = @_; #- done here and also at the end of install2.pm, just in case... install_any::write_fstab($o); @@ -309,7 +309,7 @@ sub configureX { } #------------------------------------------------------------------------------ sub exitInstall { - my ($clicked, $ent_number, $auto) = @_; + my ($_clicked, $_xent_number, $auto) = @_; installStepsCall($o, $auto, 'exitInstall', getNextStep() eq 'exitInstall'); } diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 014dea3e5..40f6d3370 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -457,7 +457,7 @@ sub addToBeDone(&$) { sub setAuthentication { my ($o) = @_; - my ($shadow, $md5, $ldap, $nis, $winbind, $winpass) = @{$o->{authentication} || {}}{qw(shadow md5 LDAP NIS winbind winpass)}; + my ($shadow, $ldap, $nis, $winbind, $winpass) = @{$o->{authentication} || {}}{qw(shadow LDAP NIS winbind winpass)}; my $p = $o->{prefix}; any::enableShadow($p) if $shadow; if ($ldap) { @@ -737,7 +737,7 @@ sub g_auto_install { exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang authentication mouse netc timezone superuser intf keyboard users partitioning isUpgrade manualFstab nomouseprobe crypto security security_user libsafe netcnx useSupermount autoExitInstall mkbootdisk X services); #- TODO modules bootloader - if (my $printer = $::o->{printer}) { + if ($::o->{printer}) { $o->{printer}{$_} = $::o->{printer}{$_} foreach qw(SPOOLER DEFAULT BROWSEPOLLADDR BROWSEPOLLPORT MANUALCUPSCONFIG); $o->{printer}{configured} = {}; foreach my $queue (keys %{$::o->{printer}{configured}}) { @@ -906,7 +906,7 @@ sub loadO { } -e $f or $f .= '.pl'; - my $b = before_leaving { + my $_b = before_leaving { fs::umount("/mnt") unless $::testing; modules::unload(qw(vfat fat)); }; diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index 627305e8d..ab565eef8 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -74,7 +74,7 @@ sub partitionWizardSolutions { my $hds = $all_hds->{hds}; my $fstab = [ fsedit::get_all_fstab($all_hds) ]; my @wizlog; - my (@solutions, %solutions); + my (%solutions); my $min_linux = 400 << 11; my $max_linux = 3000 << 11; @@ -257,12 +257,12 @@ sub partitionWizard { sub upNetwork { my ($o, $pppAvoided) = @_; - my $w = $o->wait_message('', N("Bringing up the network")); + my $_w = $o->wait_message('', N("Bringing up the network")); install_steps::upNetwork($o, $pppAvoided); } sub downNetwork { my ($o, $pppOnly) = @_; - my $w = $o->wait_message('', N("Bringing down the network")); + my $_w = $o->wait_message('', N("Bringing down the network")); install_steps::downNetwork($o, $pppOnly); } diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 9aed7ba4e..23c89d2c1 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -44,7 +44,7 @@ sub new($$) { #- In/Out Steps Functions #-###################################################################################### sub enteringStep { - my ($o, $step) = @_; + my ($_o, $step) = @_; log::l("starting step `$step'"); } sub leavingStep { @@ -199,7 +199,7 @@ sub doPartitionDisks { #------------------------------------------------------------------------------ sub ask_mntpoint_s { - my ($o, $fstab) = @_; + my ($_o, $fstab) = @_; #- TODO: set the mntpoints @@ -219,13 +219,13 @@ sub ask_mntpoint_s { sub rebootNeeded($) { - my ($o) = @_; + my ($_o) = @_; log::l("Rebooting..."); c::_exit(0); } sub choosePartitionsToFormat($$) { - my ($o, $fstab) = @_; + my ($_o, $fstab) = @_; foreach (@$fstab) { $_->{mntpoint} = "swap" if isSwap($_); @@ -258,7 +258,7 @@ sub setPackages { } sub choosePackages { - my ($o, $packages, $compssUsers, $first_time) = @_; + my ($o, $packages, $_compssUsers, $first_time) = @_; #- now for upgrade, package that must be upgraded are #- selected first, after is used the same scheme as install. @@ -446,8 +446,6 @@ Consoles 1,3,4,7 may also contain interesting information"; if ($o->{lang} =~ /^(zh_TW|th|vi|be|bg)/) { #- skip since we don't have the right font (it badly fails at least for zh_TW) } elsif (my $LANG = lang::lang2LANG($o->{lang})) { - my $kdmrc = "$o->{prefix}/usr/share/config/kdm/kdmrc"; - my $kde_charset = lang::charset2kde_charset(lang::lang2charset($o->{lang})); my $welcome = c::to_utf8(N("Welcome to %s", '%n')); substInFile { @@ -618,7 +616,7 @@ sub updateModulesFromFloppy { #------------------------------------------------------------------------------ sub selectMouse($) { - my ($o) = @_; + my ($_o) = @_; } #------------------------------------------------------------------------------ @@ -643,7 +641,7 @@ sub installCrypto { upNetwork($o); require crypto; - my @crypto_packages = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); + my @_crypto_packages = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); $o->pkg_install(@{$u->{packages}}); } @@ -713,8 +711,7 @@ sub configurePrinter { #------------------------------------------------------------------------------ sub setRootPassword { my ($o) = @_; - my $p = $o->{prefix}; - my $u = $o->{superuser} ||= {}; + $o->{superuser} ||= {}; $o->{superuser}{name} = 'root'; any::write_passwd_user($o->{prefix}, $o->{superuser}, $o->{authentication}{md5}); delete $o->{superuser}{name}; @@ -792,7 +789,6 @@ sub createBootdisk($) { #------------------------------------------------------------------------------ sub readBootloaderConfigBeforeInstall { my ($o) = @_; - my ($image, $v); require bootloader; add2hash($o->{bootloader} ||= {}, bootloader::read()); @@ -955,7 +951,7 @@ sub miscellaneousBefore { add2hash_($o->{miscellaneous} ||= {}, { numlock => !detect_devices::isLaptop() }); } sub miscellaneous { - my ($o) = @_; + my ($_o) = @_; #- keep some given parameters #-TODO } diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index b0acf407c..bf44f8c06 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -66,7 +66,7 @@ use common; use log; sub configureNetwork { - my ($o) = @_; + my ($_o) = @_; modules::load_category('network/main|usb'); goto &install_steps::configureNetwork; } @@ -80,7 +80,7 @@ sub enteringStep { } sub rebootNeeded { - my ($o) = @_; + my ($_o) = @_; print "\nWhile partitioning, the partition table re-read failed, needing a reboot\n"; print "This is plain wrong for an auto_install\n"; errorInStep(); diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 3709c4582..648548626 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -439,7 +439,7 @@ sub beforeInstallPackages { sub installPackages { my ($o, $packages) = @_; - my ($current_total_size, $last_size, $nb, $total_size, $start_time, $last_dtime, $trans_progress_total); + my ($current_total_size, $last_size, $nb, $total_size, $start_time, $last_dtime, $_trans_progress_total); my $w = ugtk2->new(N("Installing")); $w->sync; @@ -498,8 +498,8 @@ sub installPackages { my $decy = 0; my $first = 1; foreach (@data) { - my ($text, $x, $y, $area_width, $area_height, $bold) = @$_; - my ($width, $height, $lines, $widths, $heights, $ascents, $descents) = + my ($text, $x, $y, $area_width, $area_height, $_bold) = @$_; + my ($width, $_height, $lines, $widths, $heights, $_ascents, $_descents) = get_text_coord($text, $darea, $area_width, $area_height, 1, 0, 1, 1); if ($first && $icon) { my $iconx = ($dx-$width)/2 + $x + ${$widths}[0] - $icon_dx; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 7046e0d28..21d097ae0 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -325,7 +325,7 @@ sub setupSCSI { } } { - my $w = $o->wait_message(N("IDE"), N("Configuring IDE")); + my $_w = $o->wait_message(N("IDE"), N("Configuring IDE")); modules::load(modules::category2modules('disk/cdrom')); } any::load_category($o, 'bus/firewire', 1); @@ -345,7 +345,7 @@ sub ask_mntpoint_s { die N("No partition available") if @fstab == 0; { - my $w = $o->wait_message('', N("Scanning partitions to find mount points")); + my $_w = $o->wait_message('', N("Scanning partitions to find mount points")); install_any::suggest_mount_points($fstab, $o->{prefix}, 'uniq'); log::l("default mntpoint $_->{mntpoint} $_->{device}") foreach @fstab; } @@ -455,7 +455,7 @@ sub choosePartitionsToFormat { sub formatMountPartitions { - my ($o, $fstab) = @_; + my ($o, $_fstab) = @_; my $w; catch_cdie { fs::formatMount_all($o->{all_hds}{raids}, $o->{fstab}, $o->{prefix}, sub { @@ -490,7 +490,7 @@ sub setPackages { } #------------------------------------------------------------------------------ sub choosePackages { - my ($o, $packages, $compssUsers, $first_time) = @_; + my ($o, $packages, $compssUsers, $_first_time) = @_; #- this is done at the very beginning to take into account #- selection of CD by user if using a cdrom. @@ -507,7 +507,7 @@ sub choosePackages { my $min_mark = $::expert ? 3 : 4; my $b = pkgs::saveSelected($packages); - my $level = pkgs::setSelectedFromCompssList($packages, { map { $_ => 1 } map { @{$compssUsers->{$_}{flags}} } @{$o->{compssUsersSorted}} }, $min_mark, 0); + my $_level = pkgs::setSelectedFromCompssList($packages, { map { $_ => 1 } map { @{$compssUsers->{$_}{flags}} } @{$o->{compssUsersSorted}} }, $min_mark, 0); my $max_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero. log::l("max size (level $min_mark) is : " . formatXiB($max_size)); pkgs::restoreSelected($b); @@ -610,7 +610,7 @@ sub chooseGroups { } @groups; # @groups = grep { $size{$_} = round_down($size{$_} / sqr(1024), 10) } @groups; #- don't display the empty or small one (eg: because all packages are below $min_level) - my ($all, $size, $unselect_all); + my ($size, $unselect_all); my $available_size = install_any::getAvailableSpace($o) / sqr(1024); my $size_to_display = sub { my $lsize = $system_size + $compute_size->(map { @{$compssUsers->{$_}{flags}} } grep { $val{$_} } @groups); @@ -819,7 +819,7 @@ N("There was an error installing packages:"), $1, N("Go on anyway?") ], 1) and r sub afterInstallPackages($) { my ($o) = @_; - my $w = $o->wait_message('', N("Post-install configuration")); + my $_w = $o->wait_message('', N("Post-install configuration")); $o->SUPER::afterInstallPackages($o); } @@ -904,7 +904,7 @@ Do you want to install the updates ?"))) || return; require crypto; eval { - my @mirrors = do { my $w = $o->wait_message('', + my @mirrors = do { my $_w = $o->wait_message('', N("Contacting Mandrake Linux web site to get the list of available mirrors...")); crypto::mirrors() }; #- if no mirror have been found, use current time zone and propose among available. @@ -919,7 +919,7 @@ Do you want to install the updates ?"))) || return; return if $@ || !$u->{mirror}; my $update_medium = do { - my $w = $o->wait_message('', N("Contacting the mirror to get the list of available packages...")); + my $_w = $o->wait_message('', N("Contacting the mirror to get the list of available packages...")); crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); }; @@ -997,7 +997,6 @@ sub summary { pkgs::packageByName($o->{packages}, 'cups')->flag_installed and return N("Remote CUPS server"); return N("No printer"); } - my $entry; foreach ($printer->{currentqueue}, map { $_->{queuedata} } ($printer->{configured}{$printer->{DEFAULT}}, values %{$printer->{configured}})) { $_ && ($_->{make} || $_->{model}) and return "$_->{make} $_->{model}"; @@ -1222,14 +1221,14 @@ because XFS needs a very large driver).") : '')), $o->ask_warn('', N("Insert a floppy in %s", $l{$o->{mkbootdisk}} || $o->{mkbootdisk})); } - my $w = $o->wait_message('', N("Creating bootdisk...")); + my $_w = $o->wait_message('', N("Creating bootdisk...")); install_steps::createBootdisk($o); } #------------------------------------------------------------------------------ sub setupBootloaderBefore { my ($o) = @_; - my $w = $o->wait_message('', N("Preparing bootloader...")); + my $_w = $o->wait_message('', N("Preparing bootloader...")); $o->set_help('empty'); $o->SUPER::setupBootloaderBefore($o); } @@ -1256,7 +1255,7 @@ try to force installation even if that destroys the first partition?")); any::setupBootloader($o, $o->{bootloader}, $o->{all_hds}, $o->{fstab}, $o->{security}, $o->{prefix}, $more) or return; { - my $w = $o->wait_message('', N("Installing bootloader")); + my $_w = $o->wait_message('', N("Installing bootloader")); eval { $o->SUPER::setupBootloader }; } if (my $err = $@) { @@ -1276,7 +1275,7 @@ try to force installation even if that destroys the first partition?")); } sub miscellaneous { - my ($o, $clicked) = @_; + my ($o, $_clicked) = @_; if ($::expert) { any::choose_security_level($o, \$o->{security}, \$o->{libsafe}, \$o->{security_user}) or return; @@ -1308,7 +1307,7 @@ sub generateAutoInstFloppy { my $dev = devices::make($floppy); { - my $w = $o->wait_message('', N("Creating auto install floppy...")); + my $_w = $o->wait_message('', N("Creating auto install floppy...")); install_any::getAndSaveAutoInstallFloppy($o, $replay, $dev) or return; } common::sync(); #- if you shall remove the floppy right after the LED switches off @@ -1348,7 +1347,7 @@ N("http://www.mandrakelinux.com/en/90errata.php3"))), }, [ if_($::expert, - { val => \ (my $t1 = N("Generate auto install floppy")), clicked => sub { + { val => \ (my $_t1 = N("Generate auto install floppy")), clicked => sub { my $t = $o->ask_from_list_('', N("The auto install can be fully automated if wanted, in that case it will take over the hard drive!! @@ -1358,7 +1357,7 @@ You may prefer to replay the installation. "), [ N_("Replay"), N_("Automated") ]); $t and $o->generateAutoInstFloppy($t eq 'Replay'); }, advanced => 1 }, - { val => \ (my $t2 = N("Save packages selection")), clicked => sub { install_any::g_default_packages($o) }, advanced => 1 }, + { val => \ (my $_t2 = N("Save packages selection")), clicked => sub { install_any::g_default_packages($o) }, advanced => 1 }, ), ] ) if $alldone && !$::g_auto_install; diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 457abca2a..223b9800c 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -70,7 +70,7 @@ sub new($) { } sub vnew { - my ($type, $su, $icon) = @_; + my ($_type, $su, $icon) = @_; $su = $su eq "su"; if ($ENV{INTERACTIVE_HTTP}) { require interactive::http; @@ -148,7 +148,7 @@ sub ask_file { $o->ask_fileW($title, $dir); } sub ask_fileW { - my ($o, $title, $dir) = @_; + my ($o, $title, $_dir) = @_; $o->ask_from_entry($title, N("Choose a file")); } @@ -167,7 +167,7 @@ sub ask_from_listf_ { ask_from_listf($o, $title, $message, sub { translate($f->(@_)) }, $l, $def, $help); } sub ask_from_listf { - my ($o, $title, $message, $f, $l, $def, $help) = @_; + my ($_o, $_title, $_message, $_f, $l, $_def, $_help) = @_; @$l == 0 and die "ask_from_list: empty list\n" . backtrace(); @$l == 1 and return $l->[0]; goto &ask_from_listf_no_check; @@ -260,7 +260,7 @@ sub ask_from { sub ask_from_normalize { - my ($o, $common, $l) = @_; + my ($_o, $common, $l) = @_; foreach my $e (@$l) { if (my $li = $e->{list}) { @@ -287,10 +287,10 @@ sub ask_from_normalize { } elsif ($e->{type} eq 'button' || $e->{clicked} || $e->{clicked_may_quit}) { $e->{type} = 'button'; $e->{clicked_may_quit} ||= $e->{clicked} ? sub { $e->{clicked}(); 0 } : sub {}; - $e->{val} = \ (my $v = $e->{val}) if !ref($e->{val}); + $e->{val} = \ (my $_v = $e->{val}) if !ref($e->{val}); } elsif ($e->{type} eq 'label' || !ref($e->{val})) { $e->{type} = 'label'; - $e->{val} = \ (my $v = $e->{val}) if !ref($e->{val}); + $e->{val} = \ (my $_v = $e->{val}) if !ref($e->{val}); } else { $e->{type} ||= 'entry'; } diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 3d392fa3e..693a332a0 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -27,7 +27,7 @@ sub ask_warn { } sub ask_fileW { - my ($o, $title, $dir) = @_; + my ($_o, $title, $dir) = @_; my $w = ugtk2->new($title); $dir .= '/' if $dir !~ m|/$|; ugtk2::_ask_file($w, $title, $dir); @@ -82,10 +82,10 @@ sub create_treeview_list { my $select = sub { $list_tv->set_cursor($_[0], $textcolumn, 0) }; - my ($first_time, $starting_word, $start_reg) = (1, '', '^'); + my ($starting_word, $start_reg) = ('', '^'); my $timeout; $list_tv->signal_connect(key_press_event => sub { - my ($w, $event) = @_; + my ($_w, $event) = @_; my $c = chr($event->keyval & 0xff); Gtk2->timeout_remove($timeout) if $timeout; $timeout = ''; @@ -226,7 +226,7 @@ sub create_treeview_tree { } $path->free; }); - my ($first_time, $starting_word, $start_reg) = (1, '', "^"); + my ($starting_word, $start_reg) = ('', "^"); my $timeout; my $toggle = sub { @@ -240,7 +240,7 @@ sub create_treeview_tree { }; $tree->signal_connect(key_press_event => sub { - my ($w, $event) = @_; + my ($_w, $event) = @_; $selected_via_click = 0; my $c = chr($event->keyval & 0xff); $curr or return; @@ -310,11 +310,10 @@ sub create_list { }; my $tips = Gtk2::Tooltips->new; - my $toselect; each_index { my $item = Gtk2::ListItem->new(may_apply($e->{format}, $_)); $item->signal_connect(key_press_event => sub { - my ($w, $event) = @_; + my ($_w, $event) = @_; my $c = chr($event->keyval & 0xff); $may_go_to_next->($event) if $event->keyval < 0x100 ? $c eq ' ' : $c eq "\r" || $c eq "\x8d"; 1; @@ -331,7 +330,7 @@ sub create_list { #- signal_connect'ed after append_items otherwise it is called and destroys the default value $list->signal_connect(select_child => sub { - my ($w, $row) = @_; + my ($_w, $row) = @_; ${$e->{val}} = $l->[$list->child_position($row)]; &$changed; }); @@ -646,7 +645,7 @@ sub wait_messageW($$$) { $w; } sub wait_message_nextW { - my ($o, $messages, $w) = @_; + my ($_o, $messages, $w) = @_; my $msg = warp_text(join "\n", @$messages); return if $msg eq $w->{wait_messageW}->get; #- needed otherwise no expose_event :( $w->{displayed} = 0; @@ -654,7 +653,7 @@ sub wait_message_nextW { $w->flush until $w->{displayed}; } sub wait_message_endW { - my ($o, $w) = @_; + my ($_o, $w) = @_; $w->destroy; } diff --git a/perl-install/interactive/http.pm b/perl-install/interactive/http.pm index 359e61401..a4f9e3bfd 100644 --- a/perl-install/interactive/http.pm +++ b/perl-install/interactive/http.pm @@ -53,7 +53,7 @@ sub exit() { end(); exit($_[1]) } END { end() } sub ask_fromW { - my ($o, $common, $l, $l2) = @_; + my ($o, $common, $l, $_l2) = @_; redisplay: my $uid = new_uid(); @@ -138,18 +138,18 @@ sub p { } sub wait_messageW { - my ($o, $title, $messages) = @_; + my ($_o, $_title, $messages) = @_; cont_stdout(); print "\n" . CGI::p(); p(@$messages); } sub wait_message_nextW { - my ($o, $messages, $w) = @_; + my ($_o, $messages, $_w) = @_; p(@$messages); } sub wait_message_endW { - my ($o, $w) = @_; + my ($_o, $_w) = @_; p(N("Done")); print "\n" . CGI::p(); } diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm index 46f9797e5..1214de57b 100644 --- a/perl-install/interactive/newt.pm +++ b/perl-install/interactive/newt.pm @@ -81,7 +81,7 @@ sub ask_fromW { } sub ask_fromW_real { - my ($o, $common, $l, $l2) = @_; + my ($_o, $common, $l, $_l2) = @_; my $ignore; #-to handle recursivity my $old_focus = -2; @@ -207,7 +207,7 @@ sub ask_fromW_real { my ($f) = @_; $get_all->(); - my ($error, $focus) = $f->(); + my ($error, $_focus) = $f->(); if ($error) { $set_all->(); @@ -215,7 +215,7 @@ sub ask_fromW_real { !$error; }; - my ($destroyed, $canceled); + my ($canceled); do { my $r = do { local $::setstep = 1; @@ -256,7 +256,7 @@ sub waitbox { sub wait_messageW { - my ($o, $title, $messages) = @_; + my ($_o, $title, $messages) = @_; { form => waitbox($title, $messages), title => $title }; } @@ -266,8 +266,8 @@ sub wait_message_nextW { $o->wait_messageW($w->{title}, $messages); } sub wait_message_endW { - my ($o, $w) = @_; - my $wait = pop @wait_messages; + my ($_o, $_w) = @_; + my $_wait = pop @wait_messages; # log::l("interactive_newt does not handle none stacked wait-messages") if $w->{form} != $wait; Newt::PopWindow(); } diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm index 22a8e238e..a37b08c8e 100644 --- a/perl-install/interactive/stdio.pm +++ b/perl-install/interactive/stdio.pm @@ -34,7 +34,7 @@ sub good_choice { } sub ask_fromW { - my ($o, $common, $l, $l2) = @_; + my ($_o, $common, $l, $_l2) = @_; add2hash_($common, { ok => N("Ok"), cancel => N("Cancel") }) if !exists $common->{ok}; @@ -160,7 +160,7 @@ Your choice? "); } sub wait_messageW { - my ($o, $title, $message) = @_; + my ($_o, $_title, $message) = @_; print join "\n", @$message; } sub wait_message_nextW { diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm index 90097e3eb..be432c3a6 100644 --- a/perl-install/loopback.pm +++ b/perl-install/loopback.pm @@ -21,7 +21,7 @@ sub carryRootLoopback { } sub check_circular_mounts { - my ($hd, $part, $all_hds) = @_; + my ($_hd, $part, $all_hds) = @_; my $fstab = [ fsedit::get_all_fstab($all_hds), $part ]; # no pb if $part is already in $all_hds diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 96bae97ac..f90d6c895 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -193,7 +193,7 @@ sub read_conf { $c{$alias}{$type} = $val; } #- cheating here: not handling aliases of aliases - while (my ($k, $v) = each %c) { + while (my ($_k, $v) = each %c) { if (my $a = $v->{alias}) { local $c{$a}{alias}; delete $v->{probeall}; diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index f3073fd3a..d81eafe3a 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -425,13 +425,13 @@ sub test_mouse_install { require ugtk2; ugtk2->import(qw(:wrappers :create)); my $w = ugtk2->new('', disallow_big_help => 1); - my ($width, $height, $offset) = (210, round_up(min(350, $::windowheight - 150), 6), 25); + my ($width, $height, $_offset) = (210, round_up(min(350, $::windowheight - 150), 6), 25); my $darea = Gtk2::DrawingArea->new; $darea->set_events([ 'button_press_mask', 'button_release_mask' ]); #$darea must be unrealized. gtkadd($w->{window}, gtkpack(my $vbox_grab = Gtk2::VBox->new(0, 0), gtkset_size_request($darea, $width+1, $height+1), - my $okcancel = gtkset_sensitive(create_okcancel($w, undef, undef, 'edge'), 1) + gtkset_sensitive(create_okcancel($w, undef, undef, 'edge'), 1) ), ); test_mouse($mouse, $w, $darea, $width, $height); @@ -444,7 +444,7 @@ sub test_mouse_standalone { my ($mouse, $hbox) = @_; require ugtk2; ugtk2->import(qw(:wrappers)); - my ($width, $height, $offset) = (210, round_up(min(350, $::windowheight - 150), 6), 25); + my ($width, $height, $_offset) = (210, round_up(min(350, $::windowheight - 150), 6), 25); my $darea = Gtk2::DrawingArea->new; $darea->set_events([ 'button_press_mask', 'button_release_mask' ]); #$darea must be unrealized. gtkpack($hbox, @@ -454,7 +454,7 @@ sub test_mouse_standalone { } sub test_mouse { - my ($mouse, $w, $darea, $width, $height) = @_; + my ($mouse, $_w, $darea, $width, $height) = @_; # $darea->realize; IS IT REALLY NEEDED? generates a Gtk-CRITICAL when run.. require ugtk2; @@ -494,7 +494,7 @@ sub test_mouse { }; my $paintButton = sub { - my ($nb, $pressed) = @_; + my ($nb, $_pressed) = @_; my $x = 60 + $nb*33; $drawarea->(); if ($nb == 0) { diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 12fba09be..6ac803a74 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -57,13 +57,12 @@ sub new { $draw1->set_usize(540,100); my $draw2 = new Gtk::DrawingArea; $draw2->set_usize(100,300); - my ($im_up, $mask_up) = gtkcreate_png($::Wizard_pix_up || "wiz_default_up.png"); + my ($im_up, $_mask_up) = gtkcreate_png($::Wizard_pix_up || "wiz_default_up.png"); my ($y1, $x1) = $im_up->get_size; - my ($im_left, $mask_left) = gtkcreate_png($::Wizard_pix_left || "wiz_default_left.png"); + my ($im_left, $_mask_left) = gtkcreate_png($::Wizard_pix_left || "wiz_default_left.png"); my ($y2, $x2) = $im_left->get_size; my $style = $draw1->style->copy(); $style->font(Gtk::Gdk::Font->fontset_load(N("-adobe-utopia-regular-r-*-*-25-*-*-*-p-*-iso8859-*,*-r-*"))); - my $w = $style->font->string_width($::Wizard_title); $draw1->signal_connect(expose_event => sub { for (my $i = 0; $i < 540/$y1; $i++) { $draw1->window->draw_pixmap($draw1->style->bg_gc('normal'), @@ -108,7 +107,7 @@ sub main { gtkset_mousecursor_normal(); $::CCPID and kill 'USR2', $::CCPID; my $timeout = Gtk->timeout_add(1000, sub { gtkset_mousecursor_normal(); 1 }); - my $b = MDK::Common::Func::before_leaving { Gtk->timeout_remove($timeout) }; + my $_b = MDK::Common::Func::before_leaving { Gtk->timeout_remove($timeout) }; $o->show; do { @@ -177,7 +176,7 @@ sub _create_window($$) { #- $gc->set_foreground(gtkcolor(8448, 17664, 40191)); #- in hex : 33, 69, 157 $gc->set_foreground(gtkcolor(5120, 10752, 22784)); #- in hex : 20, 42, 89 #- $gc->set_foreground(gtkcolor(16896, 16896, 16896)); #- in hex : 66, 66, 66 - my $inner = gtkadd(my $f_ = gtkset_shadow_type(new Gtk::Frame(undef), 'out'), + my $inner = gtkadd(gtkset_shadow_type(new Gtk::Frame(undef), 'out'), my $f = gtkset_border_width(gtkset_shadow_type(new Gtk::Frame(undef), 'none'), 3) ); my $table; @@ -384,7 +383,7 @@ sub ask_browse_tree_info { foreach my $ic (@{$common->{icons} || []}) { push @toolbar, ($ic->{icon} => [ $ic->{help}, sub { if ($ic->{code}) { - my $w = $ic->{wait_message} && $common->{wait_message}->('', $ic->{wait_message}); + my $_w = $ic->{wait_message} && $common->{wait_message}->('', $ic->{wait_message}); $ic->{code}(); $common->{rebuild_tree}->(); } @@ -547,7 +546,7 @@ sub ask_browse_tree_info_given_widgets { }; $w->{tree}->signal_connect(key_press_event => sub { - my ($w, $e) = @_; + my ($_w, $e) = @_; my $c = chr($e->{keyval} & 0xff); $toggle->(0) if $e->{keyval} >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' '; 1; @@ -566,7 +565,7 @@ sub ask_browse_tree_info_given_widgets { }); $common->{rebuild_tree}->(); &$update_size; - my $b = before_leaving { #- ensure cleaning here. + my $_b = before_leaving { #- ensure cleaning here. foreach (values %ptree) { delete $_->{state} foreach @$_; } diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index 2d3a6bee2..b895f90fd 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -83,7 +83,7 @@ If you don't know, choose 'use pppoe'"), $l) or return; } sub adsl_ask_info { - my ($adsl, $netc, $intf, $adsl_type) = @_; + my ($adsl, $netc, $_intf, $adsl_type) = @_; my $pppoe_file = "/etc/ppp/pppoe.conf"; my $pppoe_conf = { getVarsFromSh($pppoe_file) } if $adsl_type =~ /pppoe/ && -f $pppoe_file; add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' }); diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm index 1611626e5..8951ecd44 100644 --- a/perl-install/network/drakfirewall.pm +++ b/perl-install/network/drakfirewall.pm @@ -100,7 +100,7 @@ sub default_from_pkgs { } sub get_ports { - my ($ports) = @_; + my ($_ports) = @_; my $shorewall = network::shorewall::read() or return; \$shorewall->{ports}; } diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index bee1c283a..410b81e13 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -96,7 +96,7 @@ I cannot set up this connection type.")) and return; } $::isStandalone and modules::write_conf($prefix); - my $device = conf_network_card_backend($netc, $intf, $type, $interface, $ipadr, $netadr, $interface); + my $_device = conf_network_card_backend($netc, $intf, $type, $interface, $ipadr, $netadr, $interface); # if ( $::isStandalone and !($type eq "dhcp")) { # $in->ask_yesorno(N("Network interface"), # N("I'm about to restart the network device:\n") . $device . N("\nDo you agree?"), 1) and configureNetwork2($in, $prefix, $netc, $intf) and system("$prefix/sbin/ifdown $device;$prefix/sbin/ifup $device"); @@ -170,7 +170,7 @@ sub go_ethernet { } sub configureNetwork { - my ($netc, $intf, $first_time) = @_; + my ($netc, $intf, $_first_time) = @_; local $_; any::load_category($in, 'network/main|usb|pcmcia', !$::expert, 1) or return; my @l = detect_devices::getNet() or die N("no network card found"); diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index be13b4021..a5c45d7cf 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -86,7 +86,6 @@ sub isdn_write_config_backend { chmod 0600, $f; } foreach my $f ('isdn1B.conf', 'isdn2B.conf') { - my $a = 1; substInFile { s/EAZ =.*/EAZ = $isdn->{phone_in}/; s/PHONE_OUT =.*/PHONE_OUT = $isdn->{phone_out}/; @@ -148,7 +147,7 @@ defaultroute } sub get_info_providers_backend { - my ($isdn, $netc, $name, $file) = @_; + my ($isdn, $_netc, $name, $file) = @_; $name eq 'Unlisted - edit manually' and return; foreach (catMaybeCompressed($file)) { chop; diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 08fafc265..87f042208 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -49,7 +49,7 @@ killall pppd } sub pppConfig { - my ($modem, $mouse, $netc, $intf) = @_; + my ($modem, $mouse, $netc, $_intf) = @_; $mouse ||= {}; $mouse->{device} ||= readlink "$prefix/dev/mouse"; diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 8abb0085e..585b3a075 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -116,7 +116,7 @@ sub init_globals { } sub main { - my ($prefix, $netcnx, $netc, $mouse, $in, $intf, $first_time, $direct_fr, $noauto) = @_; + my ($prefix, $netcnx, $netc, $mouse, $in, $intf, $first_time, $_direct_fr, $noauto) = @_; init_globals($in, $prefix); $netc->{minus_one} = 0; #When one configure an eth in dhcp without gateway $::isInstall and $in->set_help('configureNetwork'); @@ -168,17 +168,17 @@ If you don't want to use the auto detection, deselect the checkbox. undef $::Wizard_no_previous; set_profile($netcnx); if ($netc->{autodetection}) { - my $w = $in->wait_message(N("Network Configuration Wizard"), N("Detecting devices...")); + my $_w = $in->wait_message(N("Network Configuration Wizard"), N("Detecting devices...")); detect($netc->{autodetect}, $::isInstall && ($in->{method} eq "ftp" || $in->{method} eq "http" || $in->{method} eq "nfs")); } step_2: - my $set_default; +# my $set_default; my %conf; $conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach 'modem', 'winmodem', 'adsl', 'cable', 'lan'; $conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1 : 0; - my %l; +# my %l; # my @l = ( # [N("Normal modem connection"), $netc->{autodetect}{modem}, N_("detected on port %s"), \$conf{modem}], # [N("ISDN connection"), $netc->{autodetect}{isdn}{description}, N_("detected %s"), \$conf{isdn}], @@ -186,7 +186,7 @@ If you don't want to use the auto detection, deselect the checkbox. # [N("Cable connection"), $netc->{autodetect}{cable}, N_("cable connection detected"), \$conf{cable}], # [N("LAN connection"), $netc->{autodetect}{lan}, N_("ethernet card(s) detected"), \$conf{lan}] # ); - my $i = 0; +# my $i = 0; # map { defined $set_default or do { $_->[1] and $set_default = $i }; $i++ } @l; # my %l = ( # 1 => [N("Normal modem connection") . if_($netc->{autodetect}{modem}, " - " . N("detected on port %s", $netc->{autodetect}{modem})), "modem"], @@ -198,7 +198,6 @@ If you don't want to use the auto detection, deselect the checkbox. # ); $::isInstall and $in->set_help('configureNetwork'); - my $tata; # my $e = $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"), # [{ val => \$cnx_type, list => [sort keys %l], format => sub { $l{$_}[0] }, # changed => sub { @@ -220,7 +219,7 @@ If you don't want to use the auto detection, deselect the checkbox. [N("LAN connection") . if_($netc->{autodetect}{lan}, " - " . N("ethernet card(s) detected")), \$conf{lan}] ); $::isInstall and $in->set_help('configureNetwork'); - my $e = $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"), + $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"), [ map { { label => $_->[0], val => $_->[1], type => 'bool' } } @l ], changed => sub { return if !$netc->{autodetection}; @@ -363,7 +362,7 @@ sub save_conf { modules::load_category('network/main|usb'); require network::ethernet; network::ethernet->import; - my @all_cards = conf_network_card_backend($netc, $intf, undef, undef, undef, undef); + my @_all_cards = conf_network_card_backend($netc, $intf, undef, undef, undef, undef); $intf = { %$intf }; output_with_perm("$prefix/etc/sysconfig/network-scripts/drakconnect_conf", 0600, @@ -488,7 +487,7 @@ sub set_profile { } sub del_profile { - my ($netcnx, $profile) = @_; + my ($_netcnx, $profile) = @_; $profile or return; $profile eq "default" and return; rm_rf("$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . $profile); @@ -516,8 +515,6 @@ sub load_conf { my $modem = {}; my $isdn_external = {}; my $isdn = {}; - my $system_name; - my $domain_name; if (-e "$prefix/etc/sysconfig/network-scripts/drakconnect_conf") { foreach (cat_("$prefix/etc/sysconfig/network-scripts/drakconnect_conf")) { @@ -607,7 +604,7 @@ sub get_net_device { } sub read_net_conf { - my ($prefix, $netcnx, $netc) = @_; + my ($_prefix, $netcnx, $netc) = @_; add2hash($netcnx, { read_raw_net_conf('_conf') }); $netc->{$_} = $netcnx->{$_} foreach 'NET_DEVICE', 'NET_INTERFACE'; $netcnx->{$netcnx->{type}} ||= {}; diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 4278136fb..84cffef27 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -236,7 +236,6 @@ sub masked_ip { sub dns { my ($ip) = @_; - my $mask = masked_ip($ip); my @masked = masked_ip($ip) =~ $ip_regexp; $masked[3] = 2; join(".", @masked); diff --git a/perl-install/network/nfs.pm b/perl-install/network/nfs.pm index ab8bcfcd7..87f336e36 100644 --- a/perl-install/network/nfs.pm +++ b/perl-install/network/nfs.pm @@ -15,20 +15,20 @@ sub to_fstab_entry { $class->to_fstab_entry_raw($e, 'nfs'); } sub comment_to_string { - my ($class, $comment) = @_; + my ($_class, $comment) = @_; member($comment, qw(* 0.0.0.0/0.0.0.0 (everyone))) ? '' : $comment; } sub from_dev { - my ($class, $dev) = @_; + my ($_class, $dev) = @_; $dev =~ m|(.*?):(.*)|; } sub to_dev_raw { - my ($class, $server, $name) = @_; + my ($_class, $server, $name) = @_; $server . ':' . $name; } sub check { - my ($class, $in) = @_; + my ($_class, $in) = @_; $in->do_pkgs->ensure_is_installed('nfs-utils-clients', '/usr/sbin/showmount'); } @@ -51,7 +51,7 @@ sub find_servers { } sub find_exports { - my ($class, $server) = @_; + my ($_class, $server) = @_; my @l; run_program::raw({ timeout => 1 }, "showmount", '>', \@l, "-e", $server->{ip} || $server->{name}); diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm index e3dfc9ce6..7adf01a3a 100644 --- a/perl-install/network/smb.pm +++ b/perl-install/network/smb.pm @@ -22,16 +22,16 @@ sub to_fstab_entry { $part; } sub from_dev { - my ($class, $dev) = @_; + my ($_class, $dev) = @_; $dev =~ m|//(.*?)/(.*)|; } sub to_dev_raw { - my ($class, $server, $name) = @_; + my ($_class, $server, $name) = @_; '//' . $server . '/' . $name; } sub check { - my ($class, $in) = @_; + my ($_class, $in) = @_; $in->do_pkgs->ensure_is_installed('samba-client', '/usr/bin/nmblookup'); } @@ -84,7 +84,7 @@ sub find_servers { } sub find_exports { - my ($class, $server) = @_; + my ($_class, $server) = @_; my @l; foreach (smbclient($server)) { diff --git a/perl-install/network/smbnfs.pm b/perl-install/network/smbnfs.pm index 8bd29ea92..528a87be2 100644 --- a/perl-install/network/smbnfs.pm +++ b/perl-install/network/smbnfs.pm @@ -12,11 +12,11 @@ sub new { } sub server_to_string { - my ($class, $server) = @_; + my ($_class, $server) = @_; $server->{name} || $server->{ip}; } sub comment_to_string { - my ($class, $comment) = @_; + my ($_class, $comment) = @_; $comment; } sub to_dev { diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 8eff41c9b..c86f9de4c 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -58,14 +58,13 @@ sub ask_connect_now { N("Do you want to try to connect to the Internet now?") )) { { - my $w = $in->wait_message('', N("Testing your connection..."), 1); + my $_w = $in->wait_message('', N("Testing your connection..."), 1); connect_backend(); my $s = 30; $type =~ /modem/ and $s = 50; $type =~ /adsl/ and $s = 35; $type =~ /isdn/ and $s = 20; sleep $s; - my $netc = {}; $up = connected(); } my $m = $up ? N("The system is now connected to Internet.") . diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index ffdaf9c74..e28bdeefd 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -723,7 +723,6 @@ sub add { $part->{start} ||= 1 if arch() !~ /^sparc/; #- starting at sector 0 is not allowed adjustStartAndEnd($hd, $part) unless $forceNoAdjust; - my $e = $hd->{primary}{extended}; my $nb_primaries = $hd->{device} =~ /^rd/ ? 3 : 1; if (arch() =~ /^sparc|ppc/ || diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index 7faad2be4..4b78f193c 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -139,7 +139,6 @@ sub read_partitionEntries { sub read { my ($hd, $sector) = @_; - my $tmp; my $l = partition_table::dos::read($hd, $sector); my @l = grep { $_->{size} && $_->{type} && !partition_table::isExtended($_) } @$l; @@ -210,7 +209,7 @@ sub write { } sub raw_removed { - my ($hd, $raw) = @_; + my ($_hd, $raw) = @_; @$raw = grep { $_->{size} && $_->{type} } @$raw; } sub can_raw_add { diff --git a/perl-install/partition_table/mac.pm b/perl-install/partition_table/mac.pm index 4ba83faf2..942136bf1 100644 --- a/perl-install/partition_table/mac.pm +++ b/perl-install/partition_table/mac.pm @@ -93,7 +93,7 @@ sub adjustStart($$) { } sub adjustEnd($$) { - my ($hd, $part) = @_; + my ($_hd, $_part) = @_; } sub read($$) { @@ -106,7 +106,7 @@ sub read($$) { sysread $F, $tmp, psizeof($bz_format) or die "error while reading bz \(Block Zero\) in sector $sector"; my %info; @info{@$bz_fields} = unpack $bz_format, $tmp; - foreach my $i (0 .. $info{bzDrvrCnt}-1) { + foreach (1 .. $info{bzDrvrCnt}) { sysread $F, $tmp, psizeof($dd_format) or die "error while reading driver data in sector $sector"; my %dd; @dd{@$dd_fields} = unpack $dd_format, $tmp; push @{$info{ddMap}}, \%dd; diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm index a10d6d568..ac0c79aac 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -125,7 +125,7 @@ sub kernel_read($) { } sub raw_removed { - my ($hd, $raw) = @_; + my ($_hd, $_raw) = @_; } sub can_raw_add { my ($hd) = @_; @@ -133,7 +133,7 @@ sub can_raw_add { 0; } sub raw_add { - my ($hd, $raw, $part) = @_; + my ($_hd, $raw, $part) = @_; foreach (@$raw) { $_->{size} || $_->{type} and next; diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 96d7eec74..5b8e012fc 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -220,7 +220,7 @@ sub packageRequest { } sub packageCallbackChoices { - my ($urpm, $db, $state, $choices) = @_; + my ($urpm, $_db, $_state, $choices) = @_; my $prefer; foreach my $pkg (@$choices) { #- examine first an explicitely prefered package. @@ -318,7 +318,7 @@ sub unselectAllPackages($) { } sub psUpdateHdlistsDeps { - my ($prefix, $method, $packages) = @_; + my ($prefix, $_method, $packages) = @_; my $need_copy = 0; #- check if current configuration is still up-to-date and do not need to be updated. @@ -375,7 +375,6 @@ sub psUsingHdlists { sub psUsingHdlist { my ($prefix, $method, $packages, $hdlist, $medium, $rpmsdir, $descr, $selected, $fhdlist) = @_; my $fakemedium = "$descr ($method$medium)"; - my ($relocated, $ignored) = (0, 0); log::l("trying to read $hdlist for medium $medium"); #- if the medium already exist, use it. @@ -783,14 +782,14 @@ sub cleanOldRpmDb { } sub selectPackagesAlreadyInstalled { - my ($packages, $prefix) = @_; + my ($packages, $_prefix) = @_; log::l("computing installed flags and size of installed packages"); $packages->{sizes} = $packages->compute_installed_flags($packages->{rpmdb}); } sub selectPackagesToUpgrade { - my ($packages, $prefix, $medium) = @_; + my ($packages, $_prefix, $medium) = @_; #- check before that if medium is given, it should be valid. $medium && (! defined $medium->{start} || ! defined $medium->{end}) and return; @@ -973,7 +972,6 @@ sub install($$$;$$) { #- child process will run each transaction. $SIG{SEGV} = sub { log::l("segmentation fault on transactions"); c::_exit(0) }; my @prev_pids = grep { /^\d+$/ } all("/proc"); - my $db; close INPUT; select((select(OUTPUT), $| = 1)[0]); if ($::testing) { @@ -1002,7 +1000,7 @@ sub install($$$;$$) { log::l("rpm transactions start"); my $fd; #- since we return the "fileno", perl doesn't know we're still using it, and so closes it, and :-( my @probs = $trans->run($packages, force => 1, nosize => 1, callback_open => sub { - my ($data, $type, $id) = @_; + my ($data, $_type, $id) = @_; my $pkg = defined $id && $data->{depslist}[$id]; my $medium = packageMedium($packages, $pkg); my $f = $pkg && $pkg->filename; @@ -1010,7 +1008,7 @@ sub install($$$;$$) { $fd = install_any::getFile($f, $medium->{descr}); $fd ? fileno $fd : -1; }, callback_close => sub { - my ($data, $type, $id) = @_; + my ($data, $_type, $id) = @_; my $pkg = defined $id && $data->{depslist}[$id] or return; my $check_installed; $db->traverse_tag('name', [ $pkg->name ], sub { @@ -1019,7 +1017,7 @@ sub install($$$;$$) { }); $check_installed and print OUTPUT "close:$id\n"; }, callback_inst => sub { - my ($data, $type, $id, $subtype, $amount, $total) = @_; + my ($_data, $type, $id, $subtype, $amount, $total) = @_; print OUTPUT "$type:$id:$subtype:$amount:$total\n"; }); log::l("transactions done, now trying to close still opened fd"); @@ -1122,9 +1120,6 @@ sub remove { eval { fs::mount("/proc", "$prefix/proc", "proc", 0) } unless -e "$prefix/proc/cpuinfo"; - my $callbackOpen = sub { log::l("trying to open file from $_[0] which should not happen") }; - my $callbackClose = sub { log::l("trying to close file from $_[0] which should not happen") }; - #- we are not checking depends since it should come when #- upgrading a system. although we may remove some functionalities ? @@ -1162,10 +1157,10 @@ sub selected_leaves { sub naughtyServers { my ($packages) = @_; - my @old_81 = qw( + my @_old_81 = qw( freeswan ); - my @old_82 = qw( + my @_old_82 = qw( vnc-server postgresql-server mon diff --git a/perl-install/printer/common.pm b/perl-install/printer/common.pm index f78d47b90..9d8f4d9a5 100644 --- a/perl-install/printer/common.pm +++ b/perl-install/printer/common.pm @@ -29,7 +29,6 @@ sub addentry { sub addsection { my ($section, $filecontent) = @_; - my $entryinserted = 0; my @lines = split("\n", $filecontent); foreach (@lines) { # section already there, nothing to be done diff --git a/perl-install/printer/detect.pm b/perl-install/printer/detect.pm index bd73c51b8..65df25c3f 100644 --- a/perl-install/printer/detect.pm +++ b/perl-install/printer/detect.pm @@ -9,7 +9,7 @@ sub local_detect { modules::get_probeall("usb-interface") and eval { modules::load("printer") }; eval { modules::unload(qw(lp parport_pc parport_probe parport)) }; #- on kernel 2.4 parport has to be unloaded to probe again eval { modules::load(qw(parport_pc lp parport_probe)) }; #- take care as not available on 2.4 kernel (silent error). - my $b = before_leaving { eval { modules::unload("parport_probe") } }; + my $_b = before_leaving { eval { modules::unload("parport_probe") } }; detect_devices::whatPrinter(); } @@ -24,7 +24,7 @@ sub detect { sub whatNetPrinter { my ($network, $smb) = @_; - my ($i, @res); + my (@res); # Which ports should be scanned? my @portstoscan; diff --git a/perl-install/printer/gimp.pm b/perl-install/printer/gimp.pm index c3a8908a7..e6eab53c1 100644 --- a/perl-install/printer/gimp.pm +++ b/perl-install/printer/gimp.pm @@ -12,7 +12,7 @@ use printer::cups; # ------------------------------------------------------------------ sub configure { - my ($printer, $queue) = @_; + my ($printer) = @_; # Do we have files to treat? my @configfilenames = findconfigfiles(); return 1 if $#configfilenames < 0; @@ -127,7 +127,7 @@ sub addcupsremoteto { } sub removeprinterfrom { - my ($printer, $queue) = @_; + my ($_printer, $queue) = @_; # Do we have files to treat? my @configfilenames = findconfigfiles(); return 1 if $#configfilenames < 0; @@ -287,7 +287,6 @@ sub addentry { sub addprinter { my ($section, $filecontent) = @_; - my $entryinserted = 0; my @lines = split("\n", $filecontent); foreach (@lines) { # section already there, nothing to be done diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index d1b3764d6..7f1a4a44c 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -181,7 +181,6 @@ sub copy_printer_params($$) { sub getinfo($) { my ($prefix) = @_; my $printer = {}; - my @QUEUES; $::prefix = $prefix; @@ -492,7 +491,7 @@ sub read_printer_db(;$) { poll_ppd_base(); } - my @entries_db_short = sort keys %printer::thedb; + #my @entries_db_short = sort keys %printer::thedb; #%descr_to_db = map { $printer::thedb{$_}{DESCR}, $_ } @entries_db_short; #%descr_to_help = map { $printer::thedb{$_}{DESCR}, $printer::thedb{$_}{ABOUT} } @entries_db_short; #@entry_db_description = keys %descr_to_db; diff --git a/perl-install/printer/office.pm b/perl-install/printer/office.pm index 48bfe52f5..31e54a4fc 100644 --- a/perl-install/printer/office.pm +++ b/perl-install/printer/office.pm @@ -311,7 +311,7 @@ sub makeopenofficeprinterentry { } sub removestarofficeprinterentry { - my ($printer, $queue, $configprefix, $configfile) = @_; + my ($_printer, $queue, $configprefix, $configfile) = @_; # Remove default printer entry $configfile = removeentry("windows", "device=$queue,", $configfile); # Remove entry in the "[devices]" section @@ -328,7 +328,7 @@ sub removestarofficeprinterentry { } sub removeopenofficeprinterentry { - my ($printer, $queue, $configprefix, $configfile) = @_; + my ($_printer, $queue, $configprefix, $configfile) = @_; # Remove printer's section $configfile = removesection($queue, $configfile); # Remove Link of PPD file diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 9df93a5d3..318bcfe3d 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -19,7 +19,6 @@ use printer::data; sub choose_printer_type { my ($printer, $in) = @_; $in->set_help('configurePrinterConnected') if $::isInstall; - my $queue = $printer->{OLD_QUEUE}; $printer->{str_type} = $printer::printer_type_inv{$printer->{TYPE}}; my $autodetect = 0; $autodetect = 1 if $printer->{AUTODETECT}; @@ -54,10 +53,9 @@ sub config_cups { if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }; $in->set_help('configureRemoteCUPSServer') if $::isInstall; - my $queue = $printer->{OLD_QUEUE}; #- hack to handle cups remote server printing, #- first read /etc/cups/cupsd.conf for variable BrowsePoll address:port - my ($server, $port, $default, $autoconf); + my ($server, $port, $autoconf); # Return value: 0 when nothing was changed ("Apply" never pressed), 1 # when "Apply" was at least pressed once. my $retvalue = 0; @@ -363,7 +361,7 @@ sub setup_local_autoscan { !$expert_or_modify && $printer->{AUTODETECTSMB} && !files_exist('/usr/bin/smbclient')) { $in->do_pkgs->install('samba-client'); } - my $w = $in->wait_message(N("Printer auto-detection"), N("Detecting devices...")); + my $_w = $in->wait_message(N("Printer auto-detection"), N("Detecting devices...")); # When HPOJ is running, it blocks the printer ports on which it is # configured, so we stop it here. If it is not installed or not # configured, this command has no effect. @@ -741,7 +739,7 @@ sub setup_smb { if (!$::testing && !files_exist('/usr/bin/smbclient')) { $in->do_pkgs->install('samba-client'); } - my $w = $in->wait_message(N("Printer auto-detection"), N("Scanning network...")); + my $_w = $in->wait_message(N("Printer auto-detection"), N("Scanning network...")); @autodetected = printer::detect::net_smb_detect(); foreach my $p (@autodetected) { my $menustr; @@ -948,7 +946,7 @@ sub setup_socket { $in->set_help('setupSocket') if $::isInstall; - my ($hostname, $port, $uri, $remotehost, $remoteport); + my ($uri, $remotehost, $remoteport); my $queue = $printer->{OLD_QUEUE}; if ($printer->{configured}{$queue} && $printer->{currentqueue}{connect} =~ m!^(socket:|ptal:/hpjd:)!) { @@ -977,7 +975,7 @@ sub setup_socket { my $oldmenuchoice = ""; if ($printer->{AUTODETECT}) { $autodetect = 1; - my $w = $in->wait_message(N("Printer auto-detection"), N("Scanning network...")); + my $_w = $in->wait_message(N("Printer auto-detection"), N("Scanning network...")); @autodetected = printer::detect::net_detect(); foreach my $p (@autodetected) { my $menustr; @@ -1252,12 +1250,12 @@ sub setup_common { !files_exist(qw(/usr/sbin/ptal-mlcd /usr/sbin/ptal-init /usr/bin/xojpanel))) { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Installing HPOJ package...")); $in->do_pkgs->install('hpoj', 'xojpanel'); } # Configure and start HPOJ - my $w = $in->wait_message( + my $_w = $in->wait_message( N("Printerdrake"), N("Checking device and configuring HPOJ...")); $ptaldevice = printer::main::configure_hpoj($device, @autodetected); @@ -1275,7 +1273,7 @@ sub setup_common { /usr/lib/libsane-hpoj.so.1), if_(files_exist('/usr/bin/gimp'), '/usr/bin/xsane-gimp'))) { - my $w = $in->wait_message( + my $_w = $in->wait_message( N("Printerdrake"), N("Installing SANE packages...")); $in->do_pkgs->install('sane-backends', @@ -1298,7 +1296,7 @@ sub setup_common { /usr/bin/mcopy /usr/bin/MToolsFM ))) { - my $w = $in->wait_message( + my $_w = $in->wait_message( N("Printerdrake"), N("Installing mtools packages...")); $in->do_pkgs->install('mtools', 'mtoolsfm'); @@ -1349,13 +1347,13 @@ sub setup_common { $device !~ /^socket:/ && $device !~ /^http:/ && $device !~ /^ipp:/) { - my $w = $in->wait_message(N("Printerdrake"), N("Making printer port available for CUPS...")); + my $_w = $in->wait_message(N("Printerdrake"), N("Making printer port available for CUPS...")); printer::main::assure_device_is_available_for_cups($ptaldevice || $device); } #- Read the printer driver database if necessary if ((keys %printer::main::thedb) == 0) { - my $w = $in->wait_message(N("Printerdrake"), N("Reading printer database...")); + my $_w = $in->wait_message(N("Printerdrake"), N("Reading printer database...")); printer::main::read_printer_db($printer->{SPOOLER}); } @@ -1476,11 +1474,11 @@ sub get_db_entry { my ($printer, $in) = @_; #- Read the printer driver database if necessary if ((keys %printer::main::thedb) == 0) { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Reading printer database...")); printer::main::read_printer_db($printer->{SPOOLER}); } - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Preparing printer database...")); my $queue = $printer->{OLD_QUEUE}; if ($printer->{configured}{$queue}) { @@ -1597,7 +1595,7 @@ sub choose_model { $in->set_help('chooseModel') if $::isInstall; #- Read the printer driver database if necessary if ((keys %printer::main::thedb) == 0) { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Reading printer database...")); printer::main::read_printer_db($printer->{SPOOLER}); } @@ -1628,7 +1626,7 @@ sub get_printer_info { my ($printer, $in) = @_; #- Read the printer driver database if necessary #if ((keys %printer::main::thedb) == 0) { - # my $w = $in->wait_message(N("Printerdrake"), + # my $_w = $in->wait_message(N("Printerdrake"), # N("Reading printer database...")); # printer::main::read_printer_db($printer->{SPOOLER}); #} @@ -2132,7 +2130,7 @@ Note: the photo test page can take a rather long time to get printed and on lase if ($res1 && !$res2) { my @lpq_output; { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Printing test page(s)...")); $upNetwork and do { &$upNetwork(); undef $upNetwork; sleep(1) }; @@ -2283,7 +2281,7 @@ N("To know about the options available for the current printer read either the l [ N("Print option list"), N("Close") ], N("Close")); if ($choice ne N("Close")) { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Printing test page(s)...")); printer::main::print_optionlist($printer); } @@ -2342,7 +2340,7 @@ sub copy_queues_from { my $oldspoolerstr; my $noninteractive = 0; { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Reading printer data...")); @oldqueues = printer::main::get_copiable_queues($oldspooler, $newspooler); @oldqueues = sort(@oldqueues); @@ -2414,7 +2412,7 @@ You can also type a new name or skip this printer.", }, [{label => N("New printer name"),val => \$newqueue }])) { { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Transferring %s...", $oldqueue)); printer::main::copy_foomatic_queue($printer, $oldqueue, $oldspooler, $newqueue) and @@ -2435,7 +2433,7 @@ You can also type a new name or skip this printer.", } } if ($queuecopied) { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Refreshing printer data...")); printer::main::read_configured_queues($printer); } @@ -2444,7 +2442,7 @@ You can also type a new name or skip this printer.", sub start_network { my ($in, $upNetwork) = @_; - my $w = $in->wait_message(N("Configuration of a remote printer"), + my $_w = $in->wait_message(N("Configuration of a remote printer"), N("Starting network...")); if ($::isInstall) { return ($upNetwork and @@ -2527,7 +2525,7 @@ N("The network access was not running and could not be started. Please check you # The daemon is not really restarted but only SIGHUPped to not # interrupt print jobs. - my $w = $in->wait_message(N("Configuration of a remote printer"), + my $_w = $in->wait_message(N("Configuration of a remote printer"), N("Restarting printing system...")); return printer::main::SIGHUP_daemon($printer->{SPOOLER}); @@ -2537,7 +2535,7 @@ N("The network access was not running and could not be started. Please check you sub security_check { # Check the security mode and when in "high" or "paranoid" mode ask the # user whether he really wants to configure printing. - my ($printer, $in, $spooler) = @_; + my ($_printer, $in, $spooler) = @_; # Any additional dialogs caused by this subroutine should appear as # extra windows and not embedded in the "Add printer" wizard. @@ -2629,13 +2627,13 @@ sub install_spooler { # "lpr" conflicts with "LPRng", remove either "LPRng" or remove "lpr" my $packages = $spoolers{$spooler}{packages2rm}; if ($packages && files_exist($packages->[1])) { - $w = $in->wait_message(N("Printerdrake"), N("Removing %s ..."), $spoolers{$packages->[0]}{short_name}); + $w->set(N("Printerdrake"), N("Removing %s ..."), $spoolers{$packages->[0]}{short_name}); $in->do_pkgs->remove_nodeps($packages->[0]); } $packages = $spoolers{$spooler}{packages2add}; if ($packages && !files_exist(@{$packages->[1]})) { - $w = $in->wait_message(N("Printerdrake"), N("Installing %s ..."), $spoolers{$spooler}{short_name}); + $w->set(N("Printerdrake"), N("Installing %s ..."), $spoolers{$spooler}{short_name}); $in->do_pkgs->install(@{$packages->[0]}); } @@ -2665,7 +2663,6 @@ sub install_spooler { foreach (@{$spoolers{$spooler}{alternatives}}) { set_alternative($_->[0], $_->[1]); } - undef $w; # Remove/add PDQ panic buttons from the user's KDE Desktops printer::main::pdq_panic_button($spooler eq 'pdq' ? "add" : "remove"); @@ -2701,7 +2698,7 @@ sub setup_default_spooler { printer::main::removelocalprintersfromapplications($printer); # Get the queues of this spooler { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Reading printer data...")); printer::main::read_configured_queues($printer); } @@ -2710,7 +2707,7 @@ sub setup_default_spooler { # Re-read the printer database (CUPS has additional drivers, PDQ # has no raw queue) %printer::main::thedb = (); - #my $w = $in->wait_message(N("Printerdrake"), N("Reading printer database...")); + #my $_w = $in->wait_message(N("Printerdrake"), N("Reading printer database...")); #printer::main::read_printer_db($printer->{SPOOLER}); } # Save spooler choice @@ -2720,7 +2717,7 @@ sub setup_default_spooler { sub configure_queue { my ($printer, $in) = @_; - my $w = $in->wait_message(N("Printerdrake"), N("Configuring printer \"%s\"...", + my $_w = $in->wait_message(N("Printerdrake"), N("Configuring printer \"%s\"...", $printer->{currentqueue}{queue})); $printer->{complete} = 1; printer::main::configure_queue($printer); @@ -2731,7 +2728,7 @@ sub install_foomatic { my ($in) = @_; if (!$::testing && !files_exist(qw(/usr/bin/foomatic-configure /usr/lib/perl5/vendor_perl/5.8.0/Foomatic/DB.pm))) { - my $w = $in->wait_message(N("Printerdrake"), N("Installing Foomatic...")); + my $_w = $in->wait_message(N("Printerdrake"), N("Installing Foomatic...")); $in->do_pkgs->install('foomatic'); } } @@ -2764,7 +2761,7 @@ sub main { # printerdrake does not work without foomatic, and for more convenience # we install some more stuff { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Checking installed software...")); if (!$::testing && !files_exist(qw(/usr/bin/foomatic-configure @@ -2798,7 +2795,7 @@ sub main { $printer->{AUTODETECTSMB} = 1; # Control variables for the main loop - my ($menuchoice, $cursorpos, $queue, $continue, $newqueue, $editqueue, $expertswitch, $menushown) = ('', '::', $defaultprname, 1, 0, 0, 0, 0); + my ($menuchoice, $cursorpos, $queue, $continue, $newqueue, $editqueue, $menushown) = ('', '::', $defaultprname, 1, 0, 0, 0); # Cursor position in queue modification window my $modify = N("Printer options"); while ($continue) { @@ -2809,7 +2806,7 @@ sub main { # Get the default printer if (defined($printer->{SPOOLER}) && $printer->{SPOOLER} && (!defined($printer->{DEFAULT}) || $printer->{DEFAULT})) { - my $w = $in->wait_message(N("Printerdrake"), + my $_w = $in->wait_message(N("Printerdrake"), N("Preparing Printerdrake...")); $printer->{DEFAULT} = printer::default::get_printer($printer); if ($printer->{DEFAULT}) { @@ -2824,9 +2821,10 @@ sub main { } # Configure the current printer queues in applications - my $w = $in->wait_message(N("Printerdrake"), N("Configuring applications...")); - printer::main::configureapplications($printer); - undef $w; + { + my $_w = $in->wait_message(N("Printerdrake"), N("Configuring applications...")); + printer::main::configureapplications($printer); + } if ($editqueue) { # The user was either in the printer modification dialog and did @@ -2856,7 +2854,7 @@ sub main { $printer->{SPOOLER} ||= setup_default_spooler($printer, $in, $upNetwork) || return; # This entry and the check for this entry have to use # the same translation to work properly - my $spoolerentry = N("Printing system: "); + my $_spoolerentry = N("Printing system: "); # If networking is configured, start it, but don't ask the # user to configure networking. We want to know whether we # have a local network, to suppress some buttons in the @@ -2982,12 +2980,12 @@ sub main { } # Read printer database for the new user mode %printer::main::thedb = (); - #my $w = $in->wait_message(N("Printerdrake"), + #my $_w = $in->wait_message(N("Printerdrake"), # N("Reading printer database...")); #printer::main::read_printer_db($printer->{SPOOLER}); # Re-read printer queues to switch the tree # structure between expert/normal mode. - my $w = $in->wait_message( + my $_w = $in->wait_message( N("Printerdrake"), N("Reading printer data...")); printer::main::read_configured_queues($printer); @@ -3279,7 +3277,7 @@ What do you want to modify on this printer?", configure_queue($printer, $in); # Delete old queue when it was renamed if (lc($printer->{QUEUE}) ne lc($printer->{OLD_QUEUE})) { - my $w = $in->wait_message( + my $_w = $in->wait_message( N("Printerdrake"), N("Removing old printer \"%s\"...", $printer->{OLD_QUEUE})); @@ -3326,7 +3324,7 @@ What do you want to modify on this printer?", if ($in->ask_yesorno('', N("Do you really want to remove the printer \"%s\"?", $queue), 1)) { { - my $w = $in->wait_message( + my $_w = $in->wait_message( N("Printerdrake"), N("Removing printer \"%s\"...", $queue)); if (printer::main::remove_queue($printer, $queue)) { @@ -3368,7 +3366,7 @@ What do you want to modify on this printer?", # Configure the current printer queue in applications when main menu # will not be shown (During installation in "Recommended" mode) if ($::isInstall && !$::expert && !$menushown && !$continue) { - my $w = $in->wait_message(N("Printerdrake"), N("Configuring applications...")); + my $_w = $in->wait_message(N("Printerdrake"), N("Configuring applications...")); printer::main::configureapplications($printer); } diff --git a/perl-install/resize_fat/dir_entry.pm b/perl-install/resize_fat/dir_entry.pm index 424860b86..9b990be2e 100644 --- a/perl-install/resize_fat/dir_entry.pm +++ b/perl-install/resize_fat/dir_entry.pm @@ -61,7 +61,7 @@ sub is_special_entry($) { #- return true if entry has been modified #- curr_dir_name is added to contains current directory name, "" for root. sub remap { - my ($curr_dir_name, $entry) = @_; + my ($_curr_dir_name, $entry) = @_; is_special_entry($entry) and return; diff --git a/perl-install/resize_fat/directory.pm b/perl-install/resize_fat/directory.pm index 1f2b1ede6..55bae687f 100644 --- a/perl-install/resize_fat/directory.pm +++ b/perl-install/resize_fat/directory.pm @@ -74,6 +74,6 @@ sub traverse_all($$) { #- function used by construct_dir_tree to translate the `cluster' fields in each #- directory entry sub remap($$) { - my ($fs, $directory) = @_; + my ($_fs, $directory) = @_; traverse($directory, "", \&resize_fat::dir_entry::remap); } diff --git a/perl-install/resize_fat/io.pm b/perl-install/resize_fat/io.pm index 054fb0858..7ece56533 100644 --- a/perl-install/resize_fat/io.pm +++ b/perl-install/resize_fat/io.pm @@ -17,7 +17,7 @@ sub read($$$) { $buf; } sub write($$$$) { - my ($fs, $pos, $size, $buf) = @_; + my ($fs, $pos, $_size, $buf) = @_; sysseek $fs->{fd}, $pos, 0 or die "seeking to byte #$pos failed on device $fs->{fs_name}"; syswrite $fs->{fd}, $buf or die "writing at byte #$pos failed on device $fs->{fs_name}"; } diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm index 2be0dcf0b..f38d59ce9 100755 --- a/perl-install/scanner.pm +++ b/perl-install/scanner.pm @@ -50,7 +50,7 @@ sub add2dll { } sub detect { - my ($i, $elem, @res) = (0, {}); + my ($i, @res) = 0; foreach (grep { $_->{driver} =~ /scanner/ } detect_devices::usb_probe()) { #my ($manufacturer, $model) = split '\|', $_->{description}; #$_->{description} =~ s/Hewlett[-\s_]Packard/HP/; diff --git a/perl-install/security/main.pm b/perl-install/security/main.pm index 9aa4b4038..76cbdf83a 100644 --- a/perl-install/security/main.pm +++ b/perl-install/security/main.pm @@ -53,7 +53,7 @@ Security Administrator: } sub basic_seclevel_option { - my ($seclevel_entry, $msec) = @_; + my ($seclevel_entry, $_msec) = @_; my @sec_levels = security::level::get_common_list(); my $current_level = security::level::get_string(); @@ -106,7 +106,7 @@ sub draksec_main { ######################## BASIC OPTIONS PAGE ################################ my $seclevel_entry = new Gtk2::Combo(); - $notebook->append_page(gtkpack(my $basic_page = new Gtk2::VBox(0, 0), + $notebook->append_page(gtkpack(new Gtk2::VBox(0, 0), basic_seclevel_explanations($msec), create_packtable($common_opts, [ basic_seclevel_option(\$seclevel_entry, $msec) ], diff --git a/perl-install/services.pm b/perl-install/services.pm index 5d5140161..596ca0feb 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -182,7 +182,7 @@ sub ask_install { } sub ask_standalone_gtk { - my ($in, $prefix) = @_; + my ($_in, $prefix) = @_; my ($l, $on_services) = services($prefix); require ugtk2; @@ -255,12 +255,12 @@ sub ask_standalone_gtk { } sub ask { - my ($in, $prefix) = @_; + my ($in, $_prefix) = @_; !$::isInstall && $in->isa('interactive::gtk') ? &ask_standalone_gtk : &ask_install; } sub doit { - my ($in, $on_services, $prefix) = @_; + my ($_in, $on_services, $prefix) = @_; my ($l, $was_on_services) = services($prefix); foreach (@$l) { diff --git a/perl-install/swap.pm b/perl-install/swap.pm index e170c2473..cbe572369 100644 --- a/perl-install/swap.pm +++ b/perl-install/swap.pm @@ -61,7 +61,6 @@ sub check_blocks { sub make($;$) { my ($devicename, $checkBlocks) = @_; - my $tmpdev = 0; my $badpages = 0; my ($version, $maxpages); diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index 4e7045835..d43883c5f 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -305,7 +305,7 @@ sub create_dialog { # drakfloppy / logdrake sub destroy_window { - my ($widget, $windowref, $w2) = @_; + my ($_widget, $windowref, $w2) = @_; $$windowref = undef; $w2 = undef if defined $w2; 0; @@ -536,7 +536,7 @@ sub get_text_coord { } sub gtkicons_labels_widget { - my ($args, $w, $widget_for_font, $background, $back_pixbuf, $x_back, $y_back, $x_round, + my ($args, $_w, $widget_for_font, $background, $back_pixbuf, $_xback, $_yback, $x_round, $y_round, $x_back2, $y_back2, $icon_width, $icon_height, $exec_func, $exec_hash) = @_; my @tab; @@ -553,7 +553,7 @@ sub gtkicons_labels_widget { my $pixbuf_h = compose_with_back($tag, $back_pixbuf, 170); my $draw = sub { - my ($widget, $event) = @_; + my ($_widget, $event) = @_; my ($dx, $dy) = ($darea->allocation->[2], $darea->allocation->[3]); my $state = $darea->{state}; if (!defined($dbl_area)) { @@ -658,7 +658,6 @@ sub write_on_pixmap { sub create_pix_text { #ref widget, txt, color_txt, [font], [width], [height], flag1, flag2, [ (background background_highlighted background_selecteded) backsize x y], centeredx, centeredy my ($w, $text, $font, $max_width, $max_height, $can_be_greater, $can_be_smaller, $backgrounds, $x_back, $y_back, $centeredx, $centeredy) = @_; - my $color_background; my $fake_darea = new Gtk::DrawingArea; my $style = $fake_darea->style->copy(); if (ref($font) eq 'Gtk::Gdk::Font') { @@ -848,7 +847,7 @@ sub fill_tiled { } sub compute_icons { - my ($fx, $fy, $decx, $decy, $interstice, @tab) = @_; + my ($fx, $_fy, $decx, $decy, $interstice, @tab) = @_; my $nb = $#tab; my $nb_sav = $nb; my $index = 0; diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 0e70d8136..dad83a12c 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -373,10 +373,10 @@ sub create_dialog { # drakfloppy / logdrake sub destroy_window { - my ($widget, $windowref, $w2) = @_; - $$windowref = undef; - $w2 = undef if defined $w2; - 0; + my ($_widget, $windowref, $w2) = @_; + $$windowref = undef; + $w2 = undef if defined $w2; + 0; } sub create_hbox { gtkset_layout(gtkset_border_width(Gtk2::HButtonBox->new, 3), 'spread') } @@ -522,7 +522,7 @@ sub gtktext_insert { sub gtkfontinfo { my ($widget) = @_; my $context = $widget->get_pango_context; - my $lan = $context->get_language; + my $_lan = $context->get_language; my $metrics = $context->get_metrics($widget->style->get_font_desc, $context->get_language); my %fontinfo; foreach (qw(ascent descent approximate_char_width approximate_digit_width)) { @@ -754,7 +754,7 @@ sub main { gtkset_mousecursor_normal(); $::CCPID and kill 'USR2', $::CCPID; my $timeout = Gtk2->timeout_add(1000, sub { gtkset_mousecursor_normal(); 1 }); - my $b = MDK::Common::Func::before_leaving { Gtk2->timeout_remove($timeout) }; + my $_b = MDK::Common::Func::before_leaving { Gtk2->timeout_remove($timeout) }; $o->show; do { @@ -797,7 +797,7 @@ sub _create_window($$) { my ($o, $title) = @_; my $w = Gtk2::Window->new('toplevel'); !$::isStandalone && !$::live && !$::g_auto_install and $shape_width = 3; - my $inner = gtkadd(my $f_ = gtkset_shadow_type(Gtk2::Frame->new(undef), 'out'), + my $inner = gtkadd(gtkset_shadow_type(Gtk2::Frame->new(undef), 'out'), my $f = gtkset_border_width(gtkset_shadow_type(Gtk2::Frame->new(undef), 'none'), 3) ); my $table; @@ -1040,7 +1040,7 @@ sub ask_browse_tree_info { foreach my $ic (@{$common->{icons} || []}) { push @toolbar, ($ic->{icon} => [ $ic->{help}, sub { if ($ic->{code}) { - my $w = $ic->{wait_message} && $common->{wait_message}->('', $ic->{wait_message}); + my $_w = $ic->{wait_message} && $common->{wait_message}->('', $ic->{wait_message}); $ic->{code}(); $common->{rebuild_tree}->(); } @@ -1058,7 +1058,7 @@ sub ask_browse_tree_info { sub ask_browse_tree_info_given_widgets { my ($common, $w) = @_; - my ($curr, $parent, $prev_label, $idle, $mouse_toggle_pending); + my ($curr, $prev_label, $idle, $mouse_toggle_pending); my (%wtree, %ptree, %pix, %node_state, %state_stats); my $update_size = sub { my $new_label = $common->{get_status}(); @@ -1196,7 +1196,7 @@ sub ask_browse_tree_info_given_widgets { $path->free; } else { if (ref $curr) { - my @a = $children->($curr); + my @_a = $children->($curr); my @l = $common->{grep_allowed_to_toggle}($children->($curr)) or return; my @unsel = $common->{grep_unselected}(@l); my @p = @unsel ? @@ -1237,7 +1237,7 @@ sub ask_browse_tree_info_given_widgets { }); $common->{rebuild_tree}->(); &$update_size; - my $b = before_leaving { $clear_all_caches->() }; + my $_b = before_leaving { $clear_all_caches->() }; $w->{w}->main; } |