I simply thought that this problem might be a good way for me to get my feet wet with the debugger.
Fair enough. But then - I couldn't find a question related to how to use the debugger in your post.
I thought it might bring me close to perl's machine model.
Oh, I don't think the debugger will help here. The Perl debugger may help to understand Perl code you're currently maintaining, or maybe understand the interaction with a CPAN module in cases where its documentation isn't clear enough - but it doesn't go into Perl's guts.
I know that we're encouraged to come up with an SSCCE, but this is not, nor can it easily be made so.
Then, why show the code? What do you expect us to do with it?
Question: what use statements can be removed from everything I've posted?
That question has already been answered by other monks, so let me add just a general remark: It is of little use to have use statements within a subroutine. Typically you see them near the top of the file so that it is easy to spot the dependencies of your code.
This routine has a breakpoint now:
Good - that's one of the methods to get a breakpoint into the source. Since you've already read the docs about the Perl debugger, you should be aware that you could also have done it like that:
$ perl -d 1.debug.11.pl DB<1>f debug1.pm DB<2>b 42
You could, of course, also b debug1::make_initial_captions and then step to line 42.
In reply to Re^3: Using the perl debugger to look at a renaming files function
by haj
in thread Using the perl debugger to look at a renaming files function
by Aldebaran
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |