• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

t/H07-Mar-2009-5535

ChangesH A D07-Mar-2009966 3824

MANIFESTH A D07-Mar-2009116 109

META.ymlH A D07-Mar-2009641 2019

Makefile.PLH A D07-Mar-20091.1 KiB4939

READMEH A D07-Mar-20091.6 KiB5537

Timer.pmH A D07-Mar-20094 KiB15559

README

1Template::Timer provides inline timings of the template processing
2througout your code.  It's an overridden version of Template::Context
3that wraps the process() and include() methods.
4
5Using Template::Timer is simple.
6
7    my %config = ( # Whatever your config is
8        INCLUDE_PATH    => "/my/template/path",
9        COMPILE_EXT     => ".ttc",
10        COMPILE_DIR     => "/tmp/tt",
11    );
12
13    if ( $development_mode ) {
14        $config{ CONTEXT } = Template::Timer->new( %config );
15    }
16
17    my $template = Template->new( \%config );
18
19Now when you process templates, HTML comments will get embedded in your
20output, which you can easily grep for.
21
22    <!-- TIMER START: process mainmenu/mainmenu.ttml -->
23    <!-- TIMER START: include mainmenu/cssindex.tt -->
24    <!-- TIMER START: process mainmenu/cssindex.tt -->
25    <!-- TIMER END: process mainmenu/cssindex.tt (0.017279 seconds) -->
26    <!-- TIMER END: include mainmenu/cssindex.tt (0.017401 seconds) -->
27
28....
29
30    <!-- TIMER END: process mainmenu/footer.tt (0.003016 seconds) -->
31    <!-- TIMER END: include mainmenu/footer.tt (0.003104 seconds) -->
32    <!-- TIMER END: process mainmenu/mainmenu.ttml (0.400409 seconds) -->
33
34INSTALLATION
35
36To install this module, run the following commands:
37
38    perl Makefile.PL
39    make
40    make test
41    make install
42
43
44COPYRIGHT AND LICENSE
45
46Copyright (C) 2004-2009 Andy Lester
47
48This library is free software; you can redistribute it and/or modify
49it under the terms of either the GNU Public License v3, or the Artistic
50License 2.0.
51
52    * http://www.gnu.org/copyleft/gpl.html
53
54    * http://www.opensource.org/licenses/artistic-license-2.0.php
55