in reply to mini-languages for MVC view/controller manipulation
HTML::Template . . . A popular, robust, powerful mini-language templating system which also does just fine on normal text files.
IMHO, it's not suitable for normal text files because of the way it handles whitespace:
$ perl -MHTML::Template -e '$in = join "", <>; $tmpl = HTML::Template- +>new( scalarref => \$in ); print $tmpl->output;' Hi <TMPL_IF foo> <TMPL_INCLUDE foo.txt> </TMPL_IF> Hello
Which will output:
Hi Hello
The extra lines just aren't acceptable for plaintext. It's fine for HTML since whitespace is almost always ignored there.
"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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: mini-languages for MVC view/controller manipulation
by simonm (Vicar) on Dec 28, 2004 at 07:44 UTC | |
by hardburn (Abbot) on Dec 28, 2004 at 14:13 UTC |