https://github.com/petdance/template-timer
Template::Timer, a Perl plugin for Template Toolkit for timing and benchmarking
https://github.com/petdance/template-timer
Last synced: 9 months ago
JSON representation
Template::Timer, a Perl plugin for Template Toolkit for timing and benchmarking
- Host: GitHub
- URL: https://github.com/petdance/template-timer
- Owner: petdance
- License: other
- Created: 2009-03-07T04:59:14.000Z (almost 17 years ago)
- Default Branch: master
- Last Pushed: 2013-07-17T14:42:28.000Z (over 12 years ago)
- Last Synced: 2025-04-14T23:51:46.896Z (9 months ago)
- Language: Perl
- Homepage:
- Size: 142 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE.md
Awesome Lists containing this project
README
# Template::Timer
Template::Timer provides inline timings of the time Template Toolkit
spends in template processing througout your code. It's an overridden
version of Template::Context that wraps the process() and include()
methods.
Using Template::Timer is simple.
my %config = ( # Whatever your config is
INCLUDE_PATH => "/my/template/path",
COMPILE_EXT => ".ttc",
COMPILE_DIR => "/tmp/tt",
);
if ( $development_mode ) {
$config{ CONTEXT } = Template::Timer->new( %config );
}
my $template = Template->new( \%config );
Now when you process templates, HTML comments will get embedded in your
output, which you can easily grep for.
# INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
# COPYRIGHT AND LICENSE
Copyright 2005-2013 Andy Lester.
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License v2.0.
See http://www.perlfoundation.org/artistic_license_2_0 or the LICENSE.md
file that comes with the ack distribution.