This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
leakfinder.pl: Fix select skip
authorFather Chrysostomos <sprout@cpan.org>
Sat, 8 Dec 2012 14:40:52 +0000 (06:40 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 9 Dec 2012 02:46:54 +0000 (18:46 -0800)
It wasn’t skipping select without parentheses, which was the purpose
of that (?:...) group.

Porting/leakfinder.pl

index db93a17..6fd8241 100644 (file)
@@ -25,7 +25,7 @@ for(`find .`) {
      # Creating one of these special blocks creates SVs, obviously
     next if /(?:END|CHECK|INIT)\s*\{/;
     next if /^\s*(?:push|unshift|(?:\@r = )?splice|binmode|sleep)/;
-    next if /\bselect(?:\s*\()[^()]+,/; # 4-arg select hangs
+    next if /\bselect(?:\s*|\()[^()]+,/; # 4-arg select hangs
     next if /use parent/;
     my $q = s/[\\']/sprintf "\\%02x", ord $&/gore
          =~ s/\0/'."\\0".'/grid;