From 3e4ad5e1b687f262a1d7cc39a0b905a595ac7f95 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 11 May 2004 12:31:46 +0000 Subject: perl_checker compliance --- perl-install/.perl_checker | 2 ++ perl-install/http.pm | 3 ++- perl-install/install2.pm | 2 +- perl-install/interactive/newt.pm | 2 +- perl-install/lang.pm | 2 +- perl-install/mouse.pm | 2 +- perl-install/network/netconnect.pm | 2 +- perl-install/printer/detect.pm | 3 ++- perl-install/ugtk2.pm | 4 ++-- perl-install/wizards.pm | 2 +- 10 files changed, 14 insertions(+), 10 deletions(-) (limited to 'perl-install') diff --git a/perl-install/.perl_checker b/perl-install/.perl_checker index 2958904cd..a0d25a2bd 100644 --- a/perl-install/.perl_checker +++ b/perl-install/.perl_checker @@ -1,3 +1,5 @@ +Libconf +Digest::MD5 Gtk2::Gdk::Keysyms Gtk2::Pango IO::Socket::INET diff --git a/perl-install/http.pm b/perl-install/http.pm index 14a33fd7e..6e522597a 100644 --- a/perl-install/http.pm +++ b/perl-install/http.pm @@ -30,7 +30,8 @@ sub getFile { "", ""); #- skip until empty line - my ($now, $last, $buf, $tmp) = 0; + my $now = 0; + my ($last, $buf, $tmp); my $read = sub { sysread($sock, $buf, 1) or die ''; $tmp .= $buf }; do { $last = $now; diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 8e654cb76..c1a47d33d 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -103,7 +103,7 @@ sub selectMouse { my ($clicked, $ent_number, $auto) = @_; require pkgs; - my ($first_time) = $ent_number == 1; + my $first_time = $ent_number == 1; installStepsCall($o, $auto, 'selectMouse', !$first_time || $clicked); diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm index b08b9b0b2..80197c779 100644 --- a/perl-install/interactive/newt.pm +++ b/perl-install/interactive/newt.pm @@ -218,7 +218,7 @@ sub ask_fromW_real { }; } elsif ($e->{type} =~ /list/) { $size = @{$e->{list}}; - my ($prefered_size) = @l == 1 && $height > 30 ? 10 : 5; + my $prefered_size = @l == 1 && $height > 30 ? 10 : 5; my $scroll; if ($size > $prefered_size && !$o->{no_individual_scroll}) { $has_scroll = $scroll = 1; diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 90f6b46d1..7f6115718 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -801,7 +801,7 @@ sub set { return; } - my ($lang) = $locale->{lang}; + my $lang = $locale->{lang}; exists $langs{$lang} or log::l("lang::set: trying to set to $lang but I don't know it!"), return; my $dir = "$ENV{SHARE_PATH}/locale"; diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 8fad2b955..7c53d5415 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -174,7 +174,7 @@ sub fullnames() { sub fullname2mouse { my ($fname, %opts) = @_; my ($type, @l) = split '\|', $fname; - my ($name) = pop @l; + my $name = pop @l; search: $opts{device} ||= $mice{$type}[0][0]; foreach (@{$mice{$type}[1]}) { diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 2e073fb53..d4ff1ab1d 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -1194,7 +1194,7 @@ N("Last but not least you can also type in your DNS server IP addresses."), type => "yesorno", post => sub { my ($a) = @_; - my ($type) = $netc->{internet_cnx_choice}; + my $type = $netc->{internet_cnx_choice}; $up = 1; if ($a) { # local $::isWizard = 0; diff --git a/perl-install/printer/detect.pm b/perl-install/printer/detect.pm index ba7e2f1ac..71adef0cf 100644 --- a/perl-install/printer/detect.pm +++ b/perl-install/printer/detect.pm @@ -105,8 +105,9 @@ sub whatUsbport() { # it again my $itemfound = 0; # Extract the printer data from the ID string - my ($manufacturer, $model, $serialnumber, $description, $commandset, $sku) = + my ($manufacturer, $model, $serialnumber, $description, $commandset) = ("", "", "", "", ""); + my ($sku); if ($idstr =~ /MFG:([^;]+);/ || $idstr =~ /MANUFACTURER:([^;]+);/) { $manufacturer = $1; $manufacturer =~ s/Hewlett[-\s_]Packard/HP/; diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 8407686a7..5bed679b1 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1498,7 +1498,7 @@ package Gtk2::TreeStore; sub append_set { my ($model, $parent, @values) = @_; # compatibility: - @values = @{$values[0]} if $#values == 0 && ref($values[0]) eq 'ARRAY'; + @values = @{$values[0]} if @values == 1 && ref($values[0]) eq 'ARRAY'; my $iter = $model->append($parent); $model->set($iter, @values); return $iter; @@ -1510,7 +1510,7 @@ package Gtk2::ListStore; sub append_set { my ($model, @values) = @_; # compatibility: - @values = @{$values[0]} if $#values == 0 && ref($values[0]) eq 'ARRAY'; + @values = @{$values[0]} if @values == 1 && ref($values[0]) eq 'ARRAY'; my $iter = $model->append; $model->set($iter, @values); return $iter; diff --git a/perl-install/wizards.pm b/perl-install/wizards.pm index 4ef29fc4e..c5a39c4da 100644 --- a/perl-install/wizards.pm +++ b/perl-install/wizards.pm @@ -136,7 +136,7 @@ sub process { die qq(inexistant "$next" wizard step) if is_empty_hash_ref($page); # FIXME or the displaying fails - my $data = defined $page->{data} ? (ref($page->{data}) eq 'CODE' ? $page->{data}->() : $page->{data}) : [ ]; + my $data = defined $page->{data} ? (ref($page->{data}) eq 'CODE' ? $page->{data}->() : $page->{data}) : []; my $data2; foreach my $d (@$data) { $d->{val} = ${$d->{val_ref}} if $d->{val_ref}; -- cgit v1.2.1