Let's say I have the following Template Tookit template:
<html> <head><title>[% title %]</title></head> <body>[% INCLUDE "$site/$body" %]</body> </html>
If "$site/$body" is not found, I currently have a DEFAULT template set in the constructor:
my $template = Template->new( { INCLUDE_PATH => $some_include_path, DEFAULT => $some_default, PLUGIN_BASE => 'Onsite::Template::Plugin', OUTPUT => \$self->{_output} } );
The problem I have is that I want need to be automatically notified when a template fails to load (which is easy if I point the default template at a plugin), but I would like to know which template failed to load. In other words, with the above code, how would I pass the value of "$site/$body" to the $some_default template?
The only thing I've come up with is including the Data::Dumpered output of the Template object in the email, but that would be about as popular as meat-flavored ice cream.
And yes, this has already been posted to the Template mailing list :)
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to Which template failed to load? by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |