in reply to Template::Plugin::Stash - expose the stash, ideal for dumpering...

Because I'm confused: This deals with a Template Toolkit concept called the stash, and not the stash where perl holds my variables ... unlike a lot of recent snippets we've seen that deals explicitly with the later. Right?


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

  • Comment on Re: Template::Plugin::Stash - expose the stash, ideal for dumpering...

Replies are listed 'Best First'.
Re: Re: Template::Plugin::Stash - expose the stash, ideal for dumpering...
by PodMaster (Abbot) on Dec 24, 2003 at 07:17 UTC
    Yes, this deals with the TT2 stash (it's the same concept as in perl). Sometimes you need to see all the variables available in a particular template. It basically answers this. Initially I solved this by embedding perl (which is bad) like so
    [% PERL %] use Data::Dumper; local $Data::Dumper::Indent = 1; print "THE STASH", Data::Dumper::Dumper($stash); [% END %]

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.