Debugging a Simple Command Line Program

Summary

In this chapter you’ve learned how to use the debugger to actually enter, control, modify, and debug a simple Perl program.

You should now be able to approach any Perl debugging problem with some confidence. Rather than remaining at the mercy of your code, whether you wrote it or because you are now responsible for maintaining it, you can now use a number of different techniques to completely inspect, instruct, change, and control its execution and behavior. Additionally, you can take a modified source file and find the differences between it and the original, before finally applying the fixes to the original file. You know how to do this in a reliable and predictable sequence, suitable for a production environment.

The rest of the book concentrates less on fixing a particular problem, and more on learning the various techniques available. In particular, the next chapter takes a look at how to approach debugging programs using the tracing facilities of the Perl debugger. You’ll use tracing abilities to find out where elements of your program were called from and with what arguments.

Keywords

Production Code Explicit Parameter Original File Context Line Parameter Passing 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Richard Foley with Andy Lester 2005

Personalised recommendations