Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Dumping input variables inTemplate::Toolkit templates

by Anonymous Monk
on Jul 11, 2014 at 16:12 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1093246]
Approved by boftx
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found