Using the Perl debugger on Lire code
Prev | Chapter 18. Testing and debugging | Next

## Using the Perl debugger on Lire code

Please use the perl debugger: investing some time to learn is pays back really quick. Here's a very tiny howto.

Start the debugger as e.g.

    perl -d `which lr_log2report` -o xml combined < tmp/log > /dev/null

After starting the debugger, run "v" and "c lineno" to make sure all modules are loaded. Once that's done, you can fast-forward to a relevant routine using e.g. "c Lire::DlfAnalysers::ReferrerCategoriser::categorise". Now you can inspect variables and evaluate expressions by running e.g.

     DB<12> x $parsed_url->{'query'}

Also, be sure to try the commands "s" and "r". Just these 4 command very likely are enough to get your job done. (The "y" command might be useful too, though). See perldebug(1) and perldebtut(1) for more information.

Prev | Up | Next
Test-installations and test-runs | Home | Chapter 19. Making a Release