diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-16 07:36:15 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-16 07:36:15 +0000 |
commit | a4fe7d9c260ca9f732695edd2790cc806be5937d (patch) | |
tree | 21846fd89be1b71258848cd180eea39f6917b088 /urpm | |
parent | 0d619a8d67fa2820e1b1ace2762448f5c733d5c0 (diff) | |
download | urpmi-a4fe7d9c260ca9f732695edd2790cc806be5937d.tar urpmi-a4fe7d9c260ca9f732695edd2790cc806be5937d.tar.gz urpmi-a4fe7d9c260ca9f732695edd2790cc806be5937d.tar.bz2 urpmi-a4fe7d9c260ca9f732695edd2790cc806be5937d.tar.xz urpmi-a4fe7d9c260ca9f732695edd2790cc806be5937d.zip |
perl_checker_fixes
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/args.pm | 4 | ||||
-rw-r--r-- | urpm/cfg.pm | 10 | ||||
-rw-r--r-- | urpm/download.pm | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/urpm/args.pm b/urpm/args.pm index e02d67ac..8c3d589b 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -26,7 +26,7 @@ sub import { if (@_ > 1 && $_[1] eq 'options') { # export the global %options hash no strict 'refs'; - *{caller().'::options'} = \%options; + *{caller() . '::options'} = \%options; } } @@ -165,7 +165,7 @@ my %options_spec = ( # This is for non-option arguments. # Assume a regex unless a ++ is inside the string. $p = quotemeta $p if $p =~ /\+\+/; - $::expr .= "m{$p}".$::pattern; + $::expr .= "m{$p}" . $::pattern; } }, }, diff --git a/urpm/cfg.pm b/urpm/cfg.pm index 2c44dd91..3d5b123a 100644 --- a/urpm/cfg.pm +++ b/urpm/cfg.pm @@ -48,7 +48,7 @@ sub load_config ($) { my ($file) = @_; my %config; my $priority = 0; - my $medium = undef; + my $medium; $err = ''; open my $f, $file or do { $err = N("unable to read config file [%s]", $file); return }; local $_; @@ -120,7 +120,7 @@ sub load_config ($) { next; } #- obsolete - /^modified$/ and next; + $_ eq 'modified' and next; } close $f; return \%config; @@ -138,15 +138,15 @@ sub dump_config ($$) { $err = N("unable to write config file [%s]", $file); return 0; }; - print $f "# generated ".(scalar localtime)."\n"; - for my $m (@media) { + print $f "# generated " . (scalar localtime) . "\n"; + foreach my $m (@media) { if ($m) { print $f quotespace($m), ' ', quotespace($config->{$m}{url}), " {\n"; } else { next if !keys %{$config->{''}}; print $f "{\n"; } - for (sort grep { $_ && $_ ne 'url' } keys %{$config->{$m}}) { + foreach (sort grep { $_ && $_ ne 'url' } keys %{$config->{$m}}) { if (/^(update|ignore|synthesis|virtual)$/) { print $f " $_\n"; } elsif ($_ ne 'priority') { diff --git a/urpm/download.pm b/urpm/download.pm index e35538e8..734487d9 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -240,9 +240,9 @@ sub sync_curl { $nick =~ s/@/%40/; $_ = "$proto://$nick:$rest"; } - m|^ftp://.*/([^/]*)$| && -e $1 && -s _ > 8192 and do { + if (m|^ftp://.*/([^/]*)$| && -e $1 && -s _ > 8192) { #- manage time stamp for large file only push @ftp_files, $_; next; - }; #- manage time stamp for large file only. + } push @other_files, $_; } if (@ftp_files) { @@ -306,7 +306,7 @@ sub sync_curl { (map { m|/([^/]*)$| ? ("-z", $1, "-O", $_) : @{[]} } @other_files))) { my @l = (@ftp_files, @other_files); - my ($buf, $file) = (''); + my ($buf, $file); $buf = ''; my $curl_pid = open my $curl, join(" ", map { "'$_'" } "/usr/bin/curl", ($options->{limit_rate} ? ("--limit-rate", $options->{limit_rate}) : ()), ($options->{resume} ? ("--continue-at", "-") : ()), |