On 31 Jul 2007, at 12:16, Ovid wrote:
I figure that running this on something like HTML::TokeParser::Simple
would be trivial.  Running it on Jifty would be painful :)

Devel::TraceLoad seems to be on roughly the right track although it's rather rough around the edges. It works by replacing CORE::GLOBAL::require. I assume it's been abandoned though - last release in 2001, tests fail.

[12:55] andy $ perl -MDevel::TraceLoad examples/simple.pl
+strict.pm [from: examples/simple.pl 3]
+warnings.pm [from: examples/simple.pl 4]
+HTML/Tiny.pm [from: examples/simple.pl 5]
   +strict.pm    [from: /Library/Perl/5.8.6/HTML/Tiny.pm 3]
   +Carp.pm    [from: /Library/Perl/5.8.6/HTML/Tiny.pm 4]
   +vars.pm    [from: /Library/Perl/5.8.6/HTML/Tiny.pm 6]
   +strict.pm    [from: /Library/Perl/5.8.6/HTML/Tiny.pm 21]

Looks like a reasonable starting point.

Can anyone think of anything wrong with the approach of replacing require with an instrumented version? If the consensus is that that's a sensible approach I'll play with tidying up the code.

[1] http://search.cpan.org/~pverd/Devel-TraceLoad-0.07/

--
Andy Armstrong, hexten.net

Reply via email to