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

Re: Template reserved words

by kennethk (Monsignor)
on Jan 22, 2013 at 21:43 UTC ( #1014797=note: print w/ replies, xml ) Need Help??


in reply to Template reserved words

You can get around the unfortunate choice of keys by using Variable Interpolation:

[% FOR line IN xml %] [% size_key = 'size'; value_key = 'value'; line.$size_key.$value_key %] [% END %]

This assumes you are using Template::Toolkit, of course.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: Template reserved words
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-07-12 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (241 votes), past polls