Badai Aqrandista wrote:
<Perl>
use lib '/i4u/web/elres-mp';
# require Apache::DB;
# Apache::DB->init;
</Perl>
PerlRequire /i4u/web/elres-mp/etc/startup.pl
PerlModule Apache::DProf
PerlModule ELRes::ELRes
PerlModule ELRes::ApacheHandler
PerlTransHandler ELRes::ApacheHandler->trans_handler
PerlLogHandler ELRes::ApacheHandler->log_handler
PerlCleanupHandler ELRes::ApacheHandler->cleanup_handler
This looks okay, assuming those lines were not commented out when you
ran it.
the startup.pl script loads and require's all modules under ELRes::
namespace on startup time, as suggested in mod_perl documentation...
Why do you have those two PerlModule calls then? I suggest taking them
out. If that breaks anything, it means your startup.pl is not doing
what you think it is.
the object that $app refer to is dynamically decided based on the
hostname, for example:
a.example.com ---> $app = ELRes::Property->new()
b.example.com ---> $app = ELRes::Property->new()
c.example.com ---> $app = ELRes::Distributor->new()
both ELRes::Property and ELRes::Distributor are children of
ELRes::TopLevelEntity and have run() method...
does this prevents the debugger to know which subroutine should be
profiled?
No, it won't make a difference.
Hmmm... Where can I learn more about the debugger?
There is information about it in the perl man pages (man perldebug), in
Programming Perl, and in various articles on the web.
I didn't know profiling needs debugger, not until I was told about it in
this mailinglist...
Apache::DProf uses the debugger hooks. You can also try Sam Tregar's
Devel::Profiler::Apache which is somewhat slower but easier to use since
it doesn't use the debugger.
- Perrin