in reply to debugging during compile

If you favour the perl debugger, you can debug perl compile time statements by manually setting a breakpoint in a BEGIN block. If you add:

BEGIN { $DB::single =1; }

To the top of your perl script, and then run it with perl -d the debugger will stop there before your use statements and the module start-up code they run are evaluated.

Replies are listed 'Best First'.
Re^2: debugging during compile
by pileofrogs (Priest) on Aug 19, 2011 at 18:58 UTC

    Awesome! I tried the debugger with no luck. I was looking for this, but I didn't understand it from the perldebug doc.

    Thanks!