Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Templating suggestions for code generation

by qq (Hermit)
on Feb 17, 2005 at 16:44 UTC ( #431999=note: print w/ replies, xml ) Need Help??


in reply to Templating suggestions for code generation

Nothing wrong with the other suggestions, but HTML::Template can do something similar:

//START <tmpl_loop name="cases"> <tmpl_if name="__first__"> switch(x) { </tmpl_if> case <tmpl_var name="case": // <tmpl_var name="case_code"> <tmpl_unless NAME="__last__"> break; <tmpl_else> } </tmpl_unless> //END

Loops have __first__, __last__, __inner__, __odd__ and __counter__.


Comment on Re: Templating suggestions for code generation
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-08-30 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls