From: jdhedden@1979.usna.com Date: Thu, 18 Mar 2004 20:25:50 +0000 (+0000) Subject: [perl #27748] 'find2perl' bug: -exec causes chdir error X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7cc8f6889f2ec8914bba5135c912be352f638471;p=p5sagit%2Fp5-mst-13.2.git [perl #27748] 'find2perl' bug: -exec causes chdir error From: "jdhedden@1979.usna.com (via RT)" Message-ID: Cwd code was planted in the output executable after the exit, so was never run. p4raw-id: //depot/perl@22586 --- diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL index 679ca3c..67022ee 100644 --- a/x2p/find2perl.PL +++ b/x2p/find2perl.PL @@ -290,6 +290,14 @@ $declaresubs END +if (exists $init{doexec}) { + print <<'END'; +use Cwd (); +my $cwd = Cwd::cwd(); + +END +} + if (exists $init{ls}) { print <<'END'; my @rwx = qw(--- --x -w- -wx r-- r-x rw- rwx); @@ -358,9 +366,6 @@ END if (exists $init{doexec}) { print <<'END'; -use Cwd (); -my $cwd = Cwd::cwd(); - sub doexec ($@) { my $ok = shift; my @command = @_; # copy so we don't try to s/// aliases to constants