John ORourke wrote: > Geoffrey Young wrote: > >> Jeff wrote: >> >> >>> Not sure if its relevant, but from general Perl usage, Devel::Profiler >>> often fails to properly recognise function names if its USE statement >>> ends up being executed before your classes have been USEd. >>> >> >> yes, because Devel::Profiler scans for then during it's import routine. >> the behavior is slightly different under mod_perl (the scan is delayed) >> > > > No joy with Devel::Profiler::Apache sadly - I couldn't even get it to > write anything out. I tried log dir permissions, tried creating the > 'profiler' directory like you have to do for DProf, I even tried > updating Profiler/Apache.pm to use Apache2::ServerUtil instead of > Apache->, and I tried pulling it in with either PerlModule or 'use' - > the only time it even appeared to load was when I tried it with a 'use' > statement on the original code, and of course it complained about the > 'Apache' package not existing.
sorry, I didnt' realize this was mp2. Devel::Profiler in svn has been ported to mp2 already, so you shouldn't need to worry about that. as for setup, you can see an exact mod_perl config in the (new) tests under t/conf in the svn sources. or you can browse them here http://devel-profiler.cvs.sourceforge.net/devel-profiler/Devel-Profiler/t/conf/extra.conf.in?revision=1.5 http://devel-profiler.cvs.sourceforge.net/devel-profiler/Devel-Profiler/t/conf/modperl_extra.pl?revision=1.3 in short, you need to use Devel::Profiler::Apache; from your startup.pl, since PerlModule doesn't actually call import(). see the documentation comments in those two files. fwiw, I'm sorry it's all in svn - I got interested in Devel::Profiler after version 0.04, and worked hard for a while to improve things on the mod_perl side, but it's simply been a lack of tuits on everyone's part getting 0.05 out. HTH --Geoff