TMPL_XXX idea SCOPE

Robert Ferney <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
If you have a datastructure that looks like

{ 
    foo=>1234,
    bar=>"iron",
    other=>{ color=>"orange", foo=>3.14, bar=>"brass" }, 
}

it would be nice to have a way to access the elements of other ...

I envision something like
<TMPL_SCOPE NAME="other">
    <div style="color:<TMPL_VAR color>;"><TMPL_VAR name="bar"></div>
</TMPL_SCOPE>

this would be a slight variation on the TMPL_LOOP with the main
difference being that there is only one of them, rather than a list of
them.. ie.. it's going to get a HASH ref instead of a LIST ref that
contains HASH refs.

I'm looking at the code now, I don't think this should be *too*
difficult. but any time you have to grok someone elses code it is
going to take longer than it would someone who is already familiar
with it.

-rob.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.