home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeLearning Perl, 3rd EditionSearch this book

B.15. 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 manpage for the latest details.

Another debugging tactic is to use the B::Lint module, which is still preliminary as of this writing.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.