Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2016-10-24 14:33 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (307 votes). Check out past polls.