[Catalyst] strict stash vars
Ian Sillitoe
ian at sillit.com
Fri Oct 17 18:30:51 BST 2008
> I wonder if there is a stricter stash plugin to store vars?
> I mean stash that knows what exactly variables have been created,
> so if I make a typo in my template file, it will croak about invalid var.
Try turning on the 'DEBUG_UNDEF' flag in your TT2 config:
http://template-toolkit.org/docs/manual/Config.html#section_DEBUG
---
use Template::Constants qw( :debug );
my $template =3D Template->new({
DEBUG =3D> DEBUG_UNDEF
});
DEBUG UNDEF
This option causes the Template Toolkit to throw an 'undef' error whenever
it encounters an undefined variable value.
---
Cheers,
Ian
-- =
Dr Ian Sillitoe
CATH Team -- http://cathdb.info
"Advice is what we ask for when we already know
the answer but wish we didn't" -- Erica Jong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20081017/602af=
33d/attachment.htm
More information about the Catalyst
mailing list