In metaconfig.git, the branch master has been updated

<http://perl5.git.perl.org/metaconfig.git/commitdiff/d90dac742d603c1c2d7d812e43d8be3344a301b9?hp=353c771d2fa0e1400c23d42c5e3f25131052b635>

- Log -----------------------------------------------------------------
commit d90dac742d603c1c2d7d812e43d8be3344a301b9
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Thu Apr 21 13:44:41 2016 +0200

    [UTIL] Scan each file max once
-----------------------------------------------------------------------

Summary of changes:
 bin/metagrep | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/metagrep b/bin/metagrep
index 71dce44..277e725 100755
--- a/bin/metagrep
+++ b/bin/metagrep
@@ -40,6 +40,8 @@ find (sub {
     exists $dir{$File::Find::dir} or return;
     #print STDERR "$File::Find::dir - $_\n";
 
+    $seen{$File::Find::name}++ and return;
+
     $File::Find::dir =~ m{^(?:$cwd/)?dist-3} and return;
 
     open my $f, "<$_" or die "$File::Find::name: $!\n";
@@ -47,8 +49,8 @@ find (sub {
     $fnm =~ s{^$cwd/}{};
     for (grep /$pat/, <$f>) {
        if ($opt_l) {
-           $seen{$fnm}++ or print "$fnm\n";
-           next;
+           print "$fnm\n";
+           return;
            }
        print "$fnm:$_";
        }

--
perl5 metaconfig repository

Reply via email to