From: Rafael Garcia-Suarez Date: Wed, 28 Apr 2004 18:28:07 +0000 (+0000) Subject: Fix for [perl #28963]: find2perl was sometimes generating X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=178eb895c5deb67bb37c347449d4e8f3288b8b7e;p=p5sagit%2Fp5-mst-13.2.git Fix for [perl #28963]: find2perl was sometimes generating invalid code. p4raw-id: //depot/perl@22749 --- diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL index b99bb49..cc6c6d8 100644 --- a/x2p/find2perl.PL +++ b/x2p/find2perl.PL @@ -266,7 +266,9 @@ while (@ARGV) { } if ($print_needed) { - $out .= "\n" . tab . '&& print("$name\n")'; + my $t = tab; + if ($t !~ /&&\s*$/) { $t .= '&& ' } + $out .= "\n" . $t . 'print("$name\n")'; }