Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: IF in a loop using HTML::Template

by saberworks (Curate)
on Mar 21, 2013 at 00:41 UTC ( #1024639=note: print w/ replies, xml ) Need Help??


in reply to Re^4: IF in a loop using HTML::Template
in thread IF in a loop using HTML::Template

You don't need to go back to the drawing board, just set the global_vars option as quoted above:

If you want your variables to be global you can use global_vars option to new() described below.
From the docs:
global_vars - normally variables declared outside a loop are not available inside a loop. This option makes <TMPL_VAR>s like global variables in Perl - they have unlimited scope. This option also affects <TMPL_IF> and <TMPL_UNLESS>.


Comment on Re^5: IF in a loop using HTML::Template

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024639]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2015-07-06 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls