On Sat, 10 Jun 2000, Perrin Harkins wrote:
> Here's something that might be obvious to others but took me a while to
> figure out:
>
> If you want to get useful profiling information, you need to initialize
> the debugger before your modules get compiled. If you pull in your
> modules from startup.pl, you can accomplish this by putting a block like
> this in your httpd.conf before the "PerlRequire startup.pl" statement:
>
> <Perl>
> use Apache::DProf;
> use Apache::DB;
> Apache::DB->init;
> </Perl>
>
> The "PerlModule Apache::DProf" directove suggested in the Apache::DProf
> docs also seems to work, but be careful because load order seems to matter
> here.
the Apache::DB docs explain this:
=item init
This function initializes the Perl debugger hooks without actually
starting the interactive debugger. In order to debug a certain piece
of code, this function must be called before the code you wish debug
is compiled.
--
it should probably be made more clear though, maybe a comment in the
config example.