> I concur. It's a great feature to have during debugging
I agree.
> but I
> wouldn't want to slow down a production instance with this feature.
If you are using cached or compiled templates, there is absolutely no slow
down. The parsing is done and you don't need to use the grammar table.
You can also use Template::Parser::CET which doesn't use Template::Grammar so
using the DUMP directive has no overhead there either.
> Debugging tools like DUMP don't belong in production.
Template->new(
PARSER => Template::Parser::CET->new,
DUMP => 0,
);
Passing DUMP 0 effectively kills all DUMPS.
> Having the DUMP
> directive be available for use in a development environment but not in
> production sounds OK,
There are many camps of debate on this issue. Some places I have worked at
were Nazi against such practices, while other places couldn't work without
them. But the issue is besides the point.
> but not at the cost of slowing down production.
Again - there is no slow down to production unless you are compiling your
templates every hit and you are not using Template::Parser::CET. But if you
are compiling your templates every hit (not using COMPILE_DIR, COMPILE_EXT,
or some other caching mechanism) then I don't think you are worried about
speed (I don't mean for this to sound harsh - but parsing and serving the
compiled documents are two separate and distinct phases in TT).
Paul
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates