Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: mini-languages for MVC view/controller manipulation

by simonm (Vicar)
on Dec 28, 2004 at 07:44 UTC ( [id://417714]=note: print w/replies, xml ) Need Help??


in reply to Re: mini-languages for MVC view/controller manipulation
in thread mini-languages for MVC view/controller manipulation

This doesn't seem like much of a problem; either leave the extra whitespace out of your source files, or mark the extra lines in some way and remove them before processing.

Version one looks like this:

Hi <TMPL_IF foo><TMPL_INCLUDE foo.txt> </TMPL_IF>Hello

Version two looks like this:

Hi \ <TMPL_IF foo>\ <TMPL_INCLUDE foo.txt> </TMPL_IF>\ \ Hello
... $in =~ s/\\\n[\t ]*//g; ...

Doesn't this same issue apply to most templating packages, or am I missing something about why this is more of an issue for HTML::Template than the others?

Replies are listed 'Best First'.
Re^3: mini-languages for MVC view/controller manipulation
by hardburn (Abbot) on Dec 28, 2004 at 14:13 UTC

    Doesn't this same issue apply to most templating packages . . . ?

    Probably. If there is anything special about H::T, it's that its default tag syntax is a bit lengthy. Compare to Text::BasicTemplate:

    Hi %if foo%include%fi% Hello

    (Note that Text::BasicTemplate doesn't have an equivilent to TMPL_INCLUDE by default, though it can call out to Perl subroutines.)

    That's a much more condensed example that, IMHO, works better for plaintext.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found