Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 taking refuge in the Monastery: (9)
As of 2015-07-08 06:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls