perlquestion
Skeeve
<p>
I just had report of a user of my Dancer app because it crashed due to a missing module.
</p>
<p>
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.
</p>
<p>
This is the code which failed:
<code>
<!--[%
USE Stash;
USE Dumper Indent = 1;
Dumper.dump( Stash.stash() )
%]-->
</code>
which I included in some templates to be able to see whether or not all my variables "arrived" at the template.
</p>
<p>
Since the "Stash" module is not on the customer's machine, the template failed.
</p>
<p>
Now I'm wondering if it's possible to instruct the template to silently do nothing when the module is missing.
</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-253915">
<hr><code>s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%</code>
<br><font color="red"><code>+</code></font><code>.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e</code>
</div></div>