santang has asked for the wisdom of the Perl Monks concerning the following question:

I have a fairly large mod_perl application which I have to learn. I would like to be able to run it inside the Perl debugger, as I find looking at a "first person" view of the running program invaluable to understanding it.

Is there a way to single step through the Perl stages of a mod_perl request cycle?

Replies are listed 'Best First'.
Re: perl -d on a mod_perl application?
by drfrog (Deacon) on Mar 19, 2004 at 02:15 UTC
    http://search.cpan.org/~gozer/mod_perl-1.29/lib/Apache/Debug.pm

    http://perl.apache.org/docs/1.0/guide/debug.html

    for docs

    basically you have to start apache in -X mode

    you may also find this useful

    http://search.cpan.org/~stas/Apache-Test-1.09/lib/Apache/Test.pm

    it can start an apache process and then run your tests

    http://perl.apache.org/docs/general/testing/testing.html

    has all the docs
Re: perl -d on a mod_perl application?
by toma (Vicar) on Mar 19, 2004 at 01:39 UTC
    The same technique as described in Debugging a CGI should work. This allows the use of either a graphical debugger such as ptkdb or text-based debugging.

    It should work perfectly the first time! - toma