NAME

Template::ShowStartStop - Display where template's start and stop

VERSION

Version 0.04

SYNOPSIS

Template::ShowStartStop provides inline comments througout your code where each template stops and starts. It's an overridden version of Template::Context that wraps the process() method.

Using Template::ShowStartStop is simple.

use Template::ShowStartStop;

my %config = ( # Whatever your config is
	INCLUDE_PATH	=> '/my/template/path',
	COMPILE_EXT	 => '.ttc',
	COMPILE_DIR	 => '/tmp/tt',
);

if ( $development_mode ) {
	$config{ CONTEXT } = Template::ShowStartStop->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. The nesting level is also shown.

<!-- START: include mainmenu/cssindex.tt -->
<!-- STOP:  include mainmenu/cssindex.tt -->

....

<!-- STOP:  include mainmenu/footer.tt -->

AUTHOR

Caleb Cushing, <xenoterracide@gmail.com>

BUGS

Please report any bugs or feature requests to bug-template-showstartstop at rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

Thanks to Andy Lester, Randal Schwartz, Bill Moseley, and to Gavin Estey for the original Template::Timer code that this is based on.

COPYRIGHT & LICENSE

This library is free software; you can redistribute it and/or modify it under the terms of either the GNU Public License v3, or the Artistic License 2.0.

* http://www.gnu.org/copyleft/gpl.html

* http://www.opensource.org/licenses/artistic-license-2.0.php