Why don't just redefine that 'undefined' method in your custom
Stash? It is even easier, than redefining 'get':
package
My::Stash;
use base
'Template::Stash';
use
Data::Dumper;
sub
undefined {
my ($self, $ident, $args);
die "Undefined var in TT: (ident,args)=\n", Dumper($ident, $args); }
1;
The
'ident' parameter is arrayref containing "identifier" of variable (it
compound name).
Of
course, this method will die even if variable exists but contains undefined
value (the Randal's solution will do too). This can be partially avoided by deep
filtering of data passed to template, replacing undef values with empty strings.
Or you may want to redefine the '_dotop' method - but this is quite
complicated.
-- |
- [Templates] Missing Variable Question Thomas Falgout
- Re: [Templates] Missing Variable Question Randal L. Schwartz
- Re: [Templates] Missing Variable Question Thomas Falgout
- RE: [Templates] Missing Variable Question Sergey Martynoff
- Re: [Templates] Missing Variable Question Dave Howorth
- Re: [Templates] Missing Variable Question Randal L. Schwartz
