On Wed, Apr 8, 2009 at 4:14 PM, E R <pc88m...@gmail.com> wrote: > When diving into a large code base and trying to understand how it > works, one thing that would be very helpful to know is how control > gets to a particular point in the code. That is, for a given > subroutine, what does the stack look like when the subroutine is > executed?
The closest thing (aside from actually using Dtrace where Perl is built with it) is either PERL_TRACE or a stack trace from Devel::StackTrace. > Also, like dtrace, it would be nice to do this on a running > perl/mod_perl process. It's kinda like being able to attach the perl > debugger to a running process. A cheap hack for this would be to build in stack trace logging calls together with a logging system like Log::Log4Perl that can watch a file to see when you turn logging on for a certain section. It's no Dtrace, but it's better than nothing if you need it. - Perrin