diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-08-11 07:57:52 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-08-11 07:57:52 +0000 |
commit | 815e560840114d7c00db50192b825d27406df298 (patch) | |
tree | a0155870bf114b6343ed4002adcd811562a32280 /urpm.pm | |
parent | 446690cc92c337319cc6e385dcc0a7f12d5083ac (diff) | |
download | urpmi-815e560840114d7c00db50192b825d27406df298.tar urpmi-815e560840114d7c00db50192b825d27406df298.tar.gz urpmi-815e560840114d7c00db50192b825d27406df298.tar.bz2 urpmi-815e560840114d7c00db50192b825d27406df298.tar.xz urpmi-815e560840114d7c00db50192b825d27406df298.zip |
Localize $_ before magical while(<$file>) loops
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -244,6 +244,7 @@ sub read_config { #- read MD5 sums (usually not in urpmi.cfg but in a separate file) my $md5sum = $urpm->open_safe("<", "$urpm->{statedir}/MD5SUM"); if ($md5sum) { + local $_; while (<$md5sum>) { my ($md5sum, $file) = /(\S*)\s+(.*)/; foreach (@{$urpm->{media}}) { @@ -972,6 +973,7 @@ sub reconfig_urpmi { #- the first line of reconfig.urpmi must be magic, to be sure it's not an error file my $magic = <$fh>; $magic =~ /^# this is an urpmi reconfiguration file/ or return undef; + local $_; while (<$fh>) { chomp; s/^\s*//; s/#.*$//; s/\s*$//; @@ -2497,6 +2499,7 @@ sub get_source_packages { if ($listfile && -r $listfile) { my $fh = $urpm->open_safe('<', $listfile); if ($fh) { + local $_; while (<$fh>) { chomp; if (my ($filename) = m|/([^/]*\.rpm)$|) { |