[Templates] Can TT throw an error if a key doesn't exist in stash?

Andy Wardley abw at wardley.org
Thu May 22 18:30:23 BST 2008


Hugh Hunter wrote:
> I'd rather have the call to 
> Template::process fail if the input file contains a reference to a key 
> that doesn't exist in the stash.

use Template::Constants qw( :debug );

my $template = Template->new({
     DEBUG => DEBUG_UNDEF,
});

HTH
A





More information about the templates mailing list