-- main::(gcd.pl:18)
die sprintf "Need two integer arguments, got %d", scalar(@ARGV) unless
@ARGV == 2;
basename is on.
highlight is off.
Eval result display style is dumper.
No breakpoints.
No actions.
No watch expressions defined.
x1 main::(gcd.pl:9)
my ($a, $b) = @_;
-- main::(gcd.pl:11)
($a, $b) = ($b, $a) if ($a > $b);
Watch expression 1: $a set
$DB::D[0] = 5
Num Type Enb Expression
1 watchpoint y $a
Breakpoint 2 set in gcd.pl at line 14
Watchpoint 1: $a changed
old value 5
new value 3
wa main::(gcd.pl:13)
return undef if $a <= 0;
gcd.pl [9-18]
9 my ($a, $b) = @_;
10 # Make: a <= b
11 ($a, $b) = ($b, $a) if ($a > $b);
12
13 -> return undef if $a <= 0;
14 B02 return $a if ($a == 1) or ($b-$a == 0);
15 return gcd($b-$a, $a);
16 }
17
18 die sprintf "Need two integer arguments, got %d", scalar(@ARGV) unless
Num Type Disp Enb Where
2 breakpoint keep y at gcd.pl:14
No actions.
Num Type Enb Expression
1 watchpoint y $a
watchpoint already hit 1 time
trepan.pl: That's all, folks...