Is there a way to invoke Perl debugger by some environment variables?
We all know that perl5db.pl开发者_开发百科
can be invoked by perl -d
,but is there a way to invoke the debugger by some environment variables instead of a command line option?
Set the PERL5OPT environment variable to '-d':
$ export PERL5OPT=-d
$ ./test.pl
Loading DB routines from perl5db.pl version 1.3
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(./test.pl:3): print "Hello\n";
DB<1> r
Hello
精彩评论