leakfinder.pl: Mair exceptions
authorFather Chrysostomos <sprout@cpan.org>
Mon, 5 Nov 2012 02:33:52 +0000 (18:33 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 5 Nov 2012 06:45:36 +0000 (22:45 -0800)
Porting/leakfinder.pl

index 2c58034..434013b 100644 (file)
@@ -22,7 +22,7 @@ for(`find .`) {
  for(`cat \Q$_\E 2>/dev/null`) {
     next if exists $exceptions{$_};
     next if /rm -rf/; # Could be an example from perlsec, e.g.
-    next if /END \{/; # Creating an END block creates SVs, obviously
+    next if /END\s*\{/; # Creating an END block creates SVs, obviously
     my $q = s/[\\']/sprintf "\\%02x", ord $&/gore
          =~ s/\0/'."\\0".'/grid;
     $prog = <<end;   
@@ -54,7 +54,15 @@ eval 'v23 : $counter++; goto v23 unless $counter == 2';
 END { unlink "./foo"; }
 exit 1;
         push @a, \$x;
+       push(@non_v, "#$_"); # not a name='value' line
+           push @v_others, "CONFIG='$v'\n";
+    push(@v_others, $line);
+           push @v_others, "PATCHLEVEL='$v'\n";
+           push @v_others, "SUBVERSION='$v'\n";
+        select(undef,undef,undef,$delay);
     unshift @INC, "../lib";
+           unshift(@inc_version_list, grep { -d } $d->[0]."/$archname", $d->[0]);
+  unshift(@INC,"xlib/$Opts{cross}");
 end
  @exceptions{@exceptions} = ();
 }