Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to invoke Perl debugger by some environment variables?

Tags:

perl

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?

like image 928
new_perl Avatar asked Sep 04 '25 03:09

new_perl


1 Answers

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
like image 183
TardisX Avatar answered Sep 07 '25 18:09

TardisX