On Fri, 19 Oct 2001, Roger Burton West wrote:
> On or about Fri, Oct 19, 2001 at 10:06:29AM -0400, [EMAIL PROTECTED] typed:
>
> >I don't understand how this would be useful. All it would be is extra typing,
>considering that <TMPL_COMMENT>content</TMPL_COMMENT>
> >is quite a bit longer than <!--content-->
> >
> >What's the utility?
>
> The TMPL_IF-type comment will not be visible in the source of the page
> served to the browser.
<tmpl_if comment>
template comment
</tmpl_if>
$template->param(comment => 0);
Works perfectly.
alternately:
<tmpl_comment>
...
</tmpl_comment>
sub comment_filter {
...
s#<(/?)tmpl_comment>#"<$1tmpl_if".$1?"":" comment">#eg;
...
}
of course, you could make the expression faster and easier to read if
you made it two s/// statements instead.
--
These days the necessities of life cost you about three times what they
used to, and half the time they aren't even fit to drink.
Visit my webpage at http://www.ncst.ernet.in/~philip/
Read my writings at http://www.ncst.ernet.in/~philip/writings/
MSN philiptellis Yahoo! philiptellis
AIM philiptellis ICQ 129711328
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]