Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

B. Beyond the Llama > Debugging

Debugging

There’s a very good debugger that comes with Perl and supports breakpoints, watchpoints, single-stepping, and generally everything you’d want in a command-line Perl debugger. It’s actually written in Perl (so, if there are bugs in the debugger, we’re not sure how they get those out). But that means that, in addition to all of the usual debugger commands, you can actually run Perl code from the debugger—calling your subroutines, changing variables, even redefining subroutines—while your program is running. See the perldebug documentation for the latest details. The Alpaca gives a detailed walkthrough of the debugger.

Another debugging tactic is to use the B::Lint module, which can warn you about potential problems that even the -w switch misses.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint