diff options
author | Shlomi Fish <shlomif@shlomifish.org> | 2014-03-27 19:07:50 +0200 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-05-28 13:35:25 +1000 |
commit | c59f1e04636e3bafbbd2c362defb3fe67b18d108 (patch) | |
tree | e93ecd8b84504e1dc52cea5b9ed690d3d6044ec9 /lib/perl5db | |
parent | bd47baf274ecea5636da37b74e4368e6f271fed5 (diff) | |
download | perl-c59f1e04636e3bafbbd2c362defb3fe67b18d108.tar.gz |
Fix RT #121509 : perl -d handling chdir().
See: https://rt.perl.org/Ticket/Display.html?id=121509
[perl #121509] perl debugger doesn't save starting dir to restart from
Thanks to Linda Walsh for reporting the problem and RJBS for commenting
for initial approval. Fix and a regression test by Shlomi Fish.
Diffstat (limited to 'lib/perl5db')
-rw-r--r-- | lib/perl5db/t/rt-121509-restart-after-chdir | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/perl5db/t/rt-121509-restart-after-chdir b/lib/perl5db/t/rt-121509-restart-after-chdir new file mode 100644 index 0000000000..f8250d768a --- /dev/null +++ b/lib/perl5db/t/rt-121509-restart-after-chdir @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use IO::Handle; + +STDOUT->autoflush(1); + +my $tmpdir = $ENV{__PERLDB_TEMP_DIR}; + +sub _do_chdir +{ + chdir($tmpdir); +} + +sub _after_chdir +{ + print "_after_chdir\n"; +} + +sub _finale +{ + my $i = 1; + while (1) + { + print "In _finale No " . ($i++) . "\n"; + } +} + +_do_chdir(); +_after_chdir(); +_finale(); |