[VPM] Victoria-pm Digest, Vol 39, Issue 5

Charles Frank charlespfrank at gmail.com
Fri Jul 27 13:41:08 PDT 2007


> hello all
>
> I would like to be able to trace/capture script subroutine calls without
> affecting performance to much.


Are you hoping to get a stack trace from a regular perl script?  Are you in
doing object oriented programming, or web development (mod_perl)?  What sort
of performance range are you looking at?  What is too slow, and what is
acceptable?

I usually use the Carp module classes to give stack traces (confess, croak):

http://perldoc.perl.org/Carp.html

I believe that Carp is now internal to Perl, and it is mature, but, as with
many object oriented modules, there is some overhead involved when using
them.

There is also Dave Rolsky's Devel::Stacktrace:

http://search.cpan.org/~drolsky/Devel-StackTrace-1.15/lib/Devel/StackTrace.pm

Usually, when I want a stack trace, I am debugging, but I see your question
is concerned w/performance, so I am assuming that you want a dump to a log
someplace while the script is executing, and so the traditional perl
functions die and warn, probably aren't much use.

A perl profiler can help w/monitoring performance with scripts.

http://search.cpan.org/~ilyaz/DProf-19990108/DProf.pm

hth,

Chuck


how do I do this.
>
> Thanks in advance for all replies.
>
> Jeremy A.
>
> _________________________________________________________________
> Windows Live Hotmail is the next generation of MSN Hotmail. It's fast,
> simple, and safer than ever and best of all – it's still free. Try it
> today!
> www.newhotmail.ca?icid=WLHMENCA146
>
>
>
> ------------------------------
>
> _______________________________________________
> Victoria-pm mailing list
> Victoria-pm at pm.org
> http://mail.pm.org/mailman/listinfo/victoria-pm
>
> End of Victoria-pm Digest, Vol 39, Issue 5
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/victoria-pm/attachments/20070727/ed0f0215/attachment.html 


More information about the Victoria-pm mailing list