|
I don't think your synopsis is right. This code
# from top (most recent) of stack to bottom.
while (my $frame = $trace->next_frame)
{
print "Has args\n" if $f->hasargs;
}
# from bottom (least recent) of stack to top.
while (my $frame = $trace->prev_frame)
{
print "Sub: ", $f->subroutine, "\n";
}
should read
# from top (most recent) of stack to bottom.
while (my $frame = $trace->next_frame)
{
print "Has args\n" if $frame->hasargs;
}
# from bottom (least recent) of stack to top.
while (my $frame = $trace->prev_frame)
{
print "Sub: ", $frame->subroutine, "\n";
}
|