Re: Comments

Robert Hicks <[email protected]> Wed, 07 Mar 2007 18:40:11 -0500
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
Is there anything funky about using filters with CGI::Application?

Robert

Mathew Robertson wrote:
> Yep, that is the form - although you wont need to 'capture', eg:
> 
> $$text_ref =~ s|<rem>.*?</rem>||gx;
> 
> Mathew
>> 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.
>>
>>   
> 


-------------------------------------------------------------------------
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