http://www.perlmonks.org?node_id=1092261

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:

<!--[% USE Stash; USE Dumper Indent = 1; Dumper.dump( Stash.stash() ) %]-->
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.


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e