in reply to Preventing BEGIN blocks from being run in the debugger?
"perldoc perldebug" says:
Debugging compile-time statements
If you have compile-time executable statements (such as code within BEGIN and CHECK blocks or use statements), these will not be stopped by debugger, although requires and INIT blocks will, and compile-time statements can be traced with AutoTrace option set in PERLDB_OPTS). From your own Perl code, however, you can transfer control back to the debugger using the following statement, which is harmless if the debugger is not running:
$DB::single = 1;
So it seems you were close but you need to put that BEGIN block in your source code and not in PERL5DB environment variable. (Though I haven't tried this.)
- tye (but my friends call me "Tye")
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (tye)Re: Preventing BEGIN blocks from being run in the debugger?
by bikeNomad (Priest) on May 25, 2001 at 19:25 UTC |