X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Ffindvars;h=3cdb854614da7b4649d3503571c996284bf26eea;hb=d653c6f5cfd47fd6d82c68d8013461da4731be40;hp=2e81244ac86cb3b7118a199aa3fd745b1ebbb915;hpb=2bd2b9e04a68ec86766c4219cf4da7f0d3168395;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/findvars b/Porting/findvars index 2e81244..3cdb854 100755 --- a/Porting/findvars +++ b/Porting/findvars @@ -11,15 +11,17 @@ chop $pat if $pat =~ /\|$/; # grep while (<>) { - if (/^(.*?)\b($pat)\b(.*)$/o) { - my $head = "$1#$2#"; - $_ = $3; - while (/^(.*?)\b($pat)\b(.*)$/o) { - $head .= "$1#$2#"; - $_ = $3; - } - print "$ARGV\:$.\:$head$_\n"; - } + print "$ARGV\:$.\:$_" if s/\b($pat)\b/#$1#/og; +# this variant might useful if the transformation is more complicated +# if (/^(.*?)\b($pat)\b(.*)$/o) { +# my $head = "$1#$2#"; +# $_ = $3; +# while (/^(.*?)\b($pat)\b(.*)$/o) { +# $head .= "$1#$2#"; +# $_ = $3; +# } +# print "$ARGV\:$.\:$head$_\n"; +# } } continue { close ARGV if eof; @@ -238,7 +240,6 @@ osname pad_reset_pending padix padix_floor -parsehook patchlevel patleave pending_ident