r27331 - /trunk/dh-make-perl/dh-make-perl

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Nov 27 08:34:37 UTC 2008


Author: dmn
Date: Thu Nov 27 08:34:35 2008
New Revision: 27331

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27331
Log:
avoid trashing $_ when reading contents file

$_ in this content is the contents file name, within the list
trashing it trashes the entry in the list

Modified:
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=27331&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Thu Nov 27 08:34:35 2008
@@ -182,9 +182,10 @@
 
             warn "Parsing $_ ...\n";
             my $capturing = 0;
-            while ( defined( $_ = $f->getline ) ) {
+            my $line;
+            while ( defined( $line = $f->getline ) ) {
                 if ($capturing) {
-                    my ( $file, $packages ) = split(/\s+/);
+                    my ( $file, $packages ) = split( /\s+/, $line );
                     next unless $file =~ s{
                         ^usr/
                         (?:share|lib)/
@@ -200,7 +201,7 @@
                     # while checking only a couple
                 }
                 else {
-                    $capturing = 1 if /^FILE\s+LOCATION/;
+                    $capturing = 1 if $line =~ /^FILE\s+LOCATION/;
                 }
             }
         }




More information about the Pkg-perl-cvs-commits mailing list