Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Re: Templating system for generating C code?

by eserte (Deacon)
on Mar 23, 2004 at 12:26 UTC ( #338967=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Templating system for generating C code?
in thread Templating system for generating C code?

Here documents work well if all you have to do is replacing some variables. If you need more, especially conditions and loops, then the handling with here documents becomes ugly --- you may embed simpler conditions as @{[ $condition ? $foo : $bar ]}, but often you have to split the here doc into multiple parts.

Regarding keeping the logic outside: most, if not all templating systems work by receiving their data from the outside and doing only the output work. Some templating systems additionaly have more features (up to a [% PERL %] directive to embed perl code), but it's up to you to use them or not.

  • Comment on Re: Re: Re: Templating system for generating C code?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2021-11-27 18:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?