diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-14 16:59:45 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-14 16:59:45 +0000 |
commit | 635f2c9e92f8c492655e9f22e378ee92d3368ced (patch) | |
tree | 79adf735d2f40ae02b843b67fb088593ddf910e8 /lib/perl5db | |
parent | 48de12d940c558762a4819fcf31deba3b8cb6fea (diff) | |
download | perl-635f2c9e92f8c492655e9f22e378ee92d3368ced.tar.gz |
A first regression test for the debugger, by Shlomi Fish
and Richard Foley.
p4raw-id: //depot/perl@29274
Diffstat (limited to 'lib/perl5db')
-rw-r--r-- | lib/perl5db/eval-line-bug | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/perl5db/eval-line-bug b/lib/perl5db/eval-line-bug new file mode 100644 index 0000000000..cf6346e9aa --- /dev/null +++ b/lib/perl5db/eval-line-bug @@ -0,0 +1,24 @@ +#!/usr/bin/perl +# +# This code is used by lib/perl5db.t !!! +# + +my $i = 5; +eval " +#line 5 script.pl +\$i = 10; +"; + +for my $q (1 .. 10) { + $i += $q; +} + +sub factorial +{ + my $i = shift; + return +($i < 2) ? 1 : $i*factorial($i-1); +} + +my $j = 4; +$j = factorial($j); +$j = factorial(10); |