From 178eb895c5deb67bb37c347449d4e8f3288b8b7e Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 28 Apr 2004 18:28:07 +0000 Subject: [PATCH] Fix for [perl #28963]: find2perl was sometimes generating invalid code. p4raw-id: //depot/perl@22749 --- x2p/find2perl.PL | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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")'; } -- 2.7.4