Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Debugging mod_perl startup

by mreece (Friar)
on Mar 08, 2007 at 23:00 UTC ( #603908=perlquestion: print w/replies, xml ) Need Help??

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

i have found myself in a situation where perl -e 'use MyApp' compiles fine, but
<Perl> use MyApp; </Perl>
dies with errors. It would be nice if I could use the perl debugger during the apache startup, but the docs for Apache::DB are pretty thin.

what strategies might i pursue to figure out why my module fails to load under Apache/1.3.36 (Unix) mod_perl/1.29? i have been skimming http://perl.apache.org/docs/1.0/guide/debug.html but it seems that my options are to use gdb for startup and Apache::DB for debugging requests.

is there any way to use the perl debugger during apache startup?

update: i have of course verified that @INC is the same in both scenarios..

update 2: i managed to track down my problem the hard way (turns out Rose::DB::Object does things a little differently when $ENV{MOD_PERL}), but the general question still stands: is there any way to use the perl debugger during apache startup?

Replies are listed 'Best First'.
Re: Debugging mod_perl startup
by perrin (Chancellor) on Mar 09, 2007 at 04:27 UTC
    Try setting PERL5OPT=-d before starting apache.
Re: Debugging mod_perl startup
by jesuashok (Curate) on Mar 09, 2007 at 01:19 UTC
    I use apache's log file, to find out all the errors happening during apache startup.
      not that it matters, but these errors were printed to screen, not to log. the question was not what are the errors, but what was causing them.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://603908]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-01-22 04:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?