Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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:

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 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


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-07-17 00:27 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (353 votes). Check out past polls.