Dan Horne wrote:
> One way is to use H::T filters. You could have something like <rem> and
> </rem> in your code, and use the filter functionality to remove the tags and
> enclosed content. There will be a performance hit - it works okay for me but
> YMMV
> 
> Dan
> 

sub tmpl_remark {
     my $text_ref = shift;

     $$text_ref =~ s|<rem>(\w+)</rem>||gx;
}


# passed to the template

filter => \&tmpl_remark;

I did not know you could use a regex in a substitute (or I never thought 
about doing so). Of course, the regex above is bogus as I am just seeing 
if that is correct form.

Robert


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to