http://qs321.pair.com?node_id=1092293


in reply to Template::Toolkit - catching errors when plugin is missing?

TT has TRY and CATCH keywords. Perhaps they'll help.

Replies are listed 'Best First'.
Re^2: Template::Toolkit - catching errors when plugin is missing?
by Skeeve (Parson) on Jul 04, 2014 at 12:25 UTC

    Indeed they did!

    <!--[% TRY; USE Stash; USE Dumper Indent = 1; Dumper.dump( Stash.stash() ) | replace('-(?=-)', '- '); CATCH %] No dump without stash ERROR! Type: [% error.type %] Info: [% error.info %] [% END %]-->

    That's my new DUMP.tt


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