Debugging Perl Scripts and Applications

If we lived in perfect world all code would come fully tested and when writing new code we could just type perfect code. In that world you would not need a debugger. We don't live in such world. You might have to maintain code with zero or little tests and documentation. You will certainly introduce bugs even in freshly written code. Even if you don't, your co-workers will.

Learning about the available options to debug Perl code is critical to anyone who has to write or maintain production code.

Audience
This is an advanced course for people who are already using Perl for writing scripts or developing applications.

Objectives

  • To be able to use various tools for debugging Perl programs
  • To improve the quality of your Perl scripts
  • To improve the speed of writing clean Perl code
  • Learn to use the built-in debugger and the ptkdb graphical debugger

Course format

  • Length of the course is 16 academic hours. (Usually 2 days).
  • 40% of the time is hands-on lab work.

Prerequisite

  • At least 6 month experience in writing Perl programs

Content

We'll go over how to use several tools and then we pick up example code and use the debuggers on these examples.

Syllabus

  • A few words about prevention - how to avoid making bugs
  • Improved print statements (incl. Data::Dumper)
  • Overview of debuggers
  • Built in debugger (-d)
  • Graphical debugger (Devel::ptkdb)
  • Moving around
  • Examining content of variables
  • Tracing execution
  • Debugging (recursive) subroutine calls
  • Debug modules and Object Oriented Perl
  • Debug CGI scripts

Request more information about Debugging Perl Scripts and Applications