On Wed, 10 Mar 2010, Tim Bunce wrote: > That's a very odd bug. There seems to be an extra BEGIN called with a > line number of 0. Has anyone any idea whay that might be?
I've found it now: the BEGIN block comes from the -DUSE_SITECUSTOMIZE code. I've committed r1158 to account for the additional entry, but it is actually still brittle, as the sitecustomize.pl file can compile arbitrary additional Perl code. So maybe it would be better to add a "no_sitecustomize" option to Devel::NYTProf::Run::profile_this() and run the profiling with "perl -f" in that case, which will skip the sitecustomize.pl processing. This should of course only be done for the test script, as real world code may depend on the execution of sitecustomize.pl (typically just @INC modifications, but really can be anything). Let me know if I should revert r1158 and implement the no_sitecustomize option instead! Cheers, -Jan -- You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected]
