|XP is just a number|
Template::Toolkit - catching errors when plugin is missing?by Skeeve (Vicar)
|on Jul 04, 2014 at 08:11 UTC||Need Help??|
Skeeve has asked for the
wisdom of the Perl Monks concerning the following question:
I just had report of a user of my Dancer app because it crashed due to a missing module.
While it was my mistake that the debug code was still in my Template::Toolkit template, I have to admit that I did not put the module on the customer's machine on purpose.
This is the code which failed:
which I included in some templates to be able to see whether or not all my variables "arrived" at the template.
Since the "Stash" module is not on the customer's machine, the template failed.
Now I'm wondering if it's possible to instruct the template to silently do nothing when the module is missing.