I have a Perl script that gives a completely useless error message, is there a way to get perl
to give a stack trace when the error occurs? I tried it this way but it did not work:
# Run command in the debbugger:
perl -d /path/to/script.pl -my -normal -args
# Reset the die command to your own subroutine to do a stacktrace:
DB<1> *CORE::GLOBAL::die = sub { require Carp; Carp::confess };
# continue the simulation
DB<2> c
It just the same meaningless error message and no stack trace. Can anyone suggest what is wrong with my technique or a better way to do it?
Additional note: I have opene the script and it seems like the main body is either encrypted or compiled in some way that I cannot visually debug it:
#!/usr/local/bin/perl
use File::Basename;
use lib dirname($0)."/libperl";
use SimFilter;
aDYBxolgYf1eunQ8XmleVAP
aAP
...