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

Re: HTML::Template macros

by jeffa (Bishop)
on Dec 05, 2003 at 04:14 UTC ( #312420=note: print w/replies, xml ) Need Help??

in reply to HTML::Template macros

++blokhead, but if you find yourself needing more of those "things", you might want to look into Template. Now don't get me wrong, i love HTML::Template, but sometimes i like having more expressional power, and Template has it:
These are my [% hobbits.size %] favorite hobbits: <ul> [% FOREACH hobbit = hobbits %] <li>[% %]</li> [% END %] </ul>
Another cool thing (possibly overkill) is that each hobbit could be a real object, not just a hash in a list.

Oh yeah, you can get rid of the file slurp in your code by using the filehandle attribute instead of the scalarref one:

filehandle => \*DATA,
Much nicer and more efficient. Cheers. :)


(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: Re: HTML::Template macros
by Anonymous Monk on Dec 05, 2003 at 07:55 UTC
    Much nicer and more efficient. Cheers. :)
    It's just as efficient, but not more efficient (look before you speak ) :D

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://312420]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2016-12-06 22:01 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (118 votes). Check out past polls.