From: "jdhedden@1979.usna.com (via RT)" <perlbug-followup@perl.org>
Message-ID: <rt-3.0.8-27748-82270.2.
99482909739062@perl.org>
Cwd code was planted in the output executable after the exit, so
was never run.
p4raw-id: //depot/perl@22586
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);
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