perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject RFC: Devel::Profiler::Plugins::Template
Date Fri, 11 May 2007 14:13:37 GMT
hi all :)

I spent some time this week adding hooks for template toolkit into
Devel::Profiler.  you can find the code here

I'm not entirely convinced of the namespace, which is why it's not on
CPAN yet.  but I'd appreciate it if folks could give it a whirl when
they have the chance.


from the docs:

  use Devel::Profiler::Plugins::Template;  # enable TT hooks
  use Devel::Profiler;                     # required


much hackery is involved, so it's not guaranteed
to work on all platforms, versions of perl, or versions of TT.
but if it does work, your C<dprofpp> results will look like this

  %Time ExclSec CumulS #Calls sec/call Csec/c  Name
   3.20   0.048  0.048   1794   0.0000 0.0000  Encode::_utf8_on
   1.27   0.019  0.028      2   0.0095 0.0140  TT::PROCESS::get_standard_nav
   0.00   0.000  0.000      2   0.0000 0.0000

which corresponds to something like

  [% BLOCK get_standard_nav %]
  [% END %]

  [% PROCESS get_standard_nav %]
  [% INCLUDE layout/frame/ %]

note that the TT results are right alongside of your normal perl calls,
which I find very convenient.


oh, and this probably won't work so well unless you have the current
Devel::Profiler code from svn:

but it might.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message