"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")In reply to (tye)Re: Preventing BEGIN blocks from being run in the debugger?
by tye
in thread Preventing BEGIN blocks from being run in the debugger?
by bikeNomad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |