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/cfg.pm | |
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/cfg.pm')
-rw-r--r-- | urpm/cfg.pm | 10 |
1 files changed, 5 insertions, 5 deletions
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') { |