Going Deeper

I've discussed essentially all the most important debugger commands in this chapter, but not the complete set. If you begin using the debugger quite a lot, you might want to check the perldebug man page or the debugger's online help for more of the options.

Using Different Debuggers

Perl allows you to customize the behavior of the debugger, or to plug in an entirely different debugger system if you like. The -d switch, when used with a colon and the name of a module, will use that module as the debugger. For example, the Devel::DProf module, available from CPAN, provides profiling for your Perl scripts (testing how long it takes to run each subroutine, to figure out the inefficiencies in your code). When installed, you can call it ...

Get Sams Teach Yourself Perl in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.