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

Re: Text::Template and YAML

by perrin (Chancellor)
on Jun 21, 2005 at 19:50 UTC ( [id://468802]=note: print w/replies, xml ) Need Help??


in reply to Text::Template and YAML

In the context of the book, doing this the long way is pretty interesting reading. Many people have made their own versions with template tools though, and you can find some of them here and on CPAN. For one example, see this article on perl.com.

Replies are listed 'Best First'.
Re^2: Text::Template and YAML
by simonm (Vicar) on Jul 23, 2005 at 16:01 UTC
    Using templates is a good idea, but for marking up a Perl code template, I'd choose a syntax other than Text::Template's interpolation style, which requires a lot of back-slashing of braces and variable sigils. I think the templates would be easier to read if in the HTML::Mason or EmbPerl syntaxes, both of which are equally easy to fill in.

      It is possible (and even encouraged by the documentation) to change the delimiters that Text::Template looks for so that you don't have to backslash the braces. For instance:

      Text::Template->new(DELIMITERS => ['<<:', ':>>']);

      Good Day,
          Dean

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-28 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found