Tracing Perl

T

Tim McDaniel

I'm uncertain on how exactly to do this, maybe just because I'm very
tired, and I'm away from the work systems in question so I can't
easily experiment. I'm hoping these questions are easy to answer.

I'm working on a large program. In a sub, I had it output a stack
trace and then die. I have a warn in the next enclosing eval several
levels up, right after the call where it started down to the point of
the die ... but $@ has been wiped by the time it reaches that warn.
I really want to find out where.

Complicating factors: it's a LARGE program, and it's running under
Apache, I think (I'm sorry, but I know little of Apache and such).

After a little Googling, I think I want to invoke perl with -d:Trace
in PERL5OPT, and I think the appropriate config file allows me to set
arbitrary environment variables.

Devel::Trace is not installed on the system in question. I think I
should just run cpan in my user account, find where it puts the
resulting Devel/Trace.pm (and hope that I don't slide into dependency
hell), and make sure -I or whatever is set so Perl can find it. Do I
have to worry about Devel::Trace being modern but the program is being
run under Perl 5.8.8? I did stumble over
http://www.effectiveperlprogramming.com/blog/1429 , which shows code
for a simple implementation that is easier to control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top