Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Dumping input variables inTemplate::Toolkit templates

by Anonymous Monk
on Jul 11, 2014 at 16:12 UTC ( #1093246=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
I'm trying to write in the bottom part of any HTML page that I generate with Template::Toolkit a summary of the parameters that were passed to the template.
If I know that I'm passing a hash named some_hash, I can dump it with:

... <!-- some_hash: [% USE Dumper; GET Dumper.dump( some_hash ); %] --> </body> </html>
Since I want to have this dump into a footer.tt template that I'm including in all other templates, is there a way I can generalize this to all the variables that are passed to each page? I don't understand how can I get a list of variables passed to the template.

Thank you

Replies are listed 'Best First'.
Re: Dumping input variables inTemplate::Toolkit templates
by wjw (Priest) on Jul 11, 2014 at 16:41 UTC

    A brief search for what I understand you to want yielded this: Here

    Does that give you what you are looking for?

    ...the majority is always wrong, and always the last to know about it...

    Insanity: Doing the same thing over and over again and expecting different results...

    A solution is nothing more than a clearly stated problem...otherwise, the problem is not a problem, it is a facct

      Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1093246]
Approved by boftx
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-11-20 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (283 votes). Check out past polls.

    Notices?