Re: [htmltmpl] Comments

2007-03-07 Thread Robert Hicks
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|.*?||gx; > > Mathew >> sub tmpl_remark { >> my $text_ref = shift; >> >> $$text_ref =~ s|(\w+)||gx; >

Re: [htmltmpl] Comments

2007-03-07 Thread Mathew Robertson
Yep, that is the form - although you wont need to 'capture', eg: $$text_ref =~ s|.*?||gx; Mathew > sub tmpl_remark { > my $text_ref = shift; > > $$text_ref =~ s|(\w+)||gx; > } > > > # passed to the template > > filter => \&tmpl_remark; > > I did not know you could use a regex in a subst

Re: [htmltmpl] Comments

2007-03-07 Thread Mathew Robertson
There is a performance hit, but only at template-parse time. ie: if you use caching there is no performance hit. Mathew Dan Horne wrote: One way is to use H::T filters. You could have something like and in your code, and use the filter functionality to remove the tags and enclosed content.

Re: [htmltmpl] Comments

2007-03-07 Thread Robert Hicks
Dan Horne wrote: > One way is to use H::T filters. You could have something like and > 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 = shi

Re: [htmltmpl] Comments

2007-03-07 Thread Dan Horne
> On Behalf Of David Kaufman > Dan Horne <[EMAIL PROTECTED]> wrote: > > One way is to use H::T filters. You could have something like > > and 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

Re: [htmltmpl] Comments

2007-03-07 Thread David Kaufman
Hi Dan, Dan Horne <[EMAIL PROTECTED]> wrote: > One way is to use H::T filters. You could have something like > and 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 ...? REM?? RE

Re: [htmltmpl] Comments

2007-03-07 Thread Brad Choate
Ah, cool. Learned something new today. On Mar 7, 2007, at 11:45 AM, Michael Peters wrote: > > > Robert Hicks wrote: >> Brad Choate wrote: >>> And be sure to specify 'die_on_bad_params' as 0 to use this >>> technique. >>> >>> On Mar 7, 2007, at 9:41 AM, Robert Hicks wrote: >> >> Surely if it is

Re: [htmltmpl] Comments

2007-03-07 Thread Dan Horne
One way is to use H::T filters. You could have something like and 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 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL

Re: [htmltmpl] Comments

2007-03-07 Thread Michael Peters
Robert Hicks wrote: > Brad Choate wrote: >> And be sure to specify 'die_on_bad_params' as 0 to use this technique. >> >> On Mar 7, 2007, at 9:41 AM, Robert Hicks wrote: > > Surely if it is in you don't need to set that. You don't need it regardless of tmpl_if or not. die_on_bad_params prevents

Re: [htmltmpl] Comments

2007-03-07 Thread Robert Hicks
Brad Choate wrote: > And be sure to specify 'die_on_bad_params' as 0 to use this technique. > > > On Mar 7, 2007, at 9:41 AM, Robert Hicks wrote: > Surely if it is in you don't need to set that. Robert - Take Surveys. E

Re: [htmltmpl] Comments

2007-03-07 Thread Brad Choate
And be sure to specify 'die_on_bad_params' as 0 to use this technique. On Mar 7, 2007, at 9:41 AM, Robert Hicks wrote: > Michael Peters wrote: >> >> Robert Hicks wrote: >>> In TT I can create a comment like: >>> >>> [%# This is a comment %] >>> >>> The benefit to that is that comment gets stripp

Re: [htmltmpl] Comments

2007-03-07 Thread Robert Hicks
Michael Peters wrote: > > Robert Hicks wrote: >> In TT I can create a comment like: >> >> [%# This is a comment %] >> >> The benefit to that is that comment gets stripped out when the template >> is processed (i.e you don't see it if you source the HTML file from the >> browser window). >> >> Is

Re: [htmltmpl] Comments

2007-03-07 Thread Michael Peters
Robert Hicks wrote: > In TT I can create a comment like: > > [%# This is a comment %] > > The benefit to that is that comment gets stripped out when the template > is processed (i.e you don't see it if you source the HTML file from the > browser window). > > Is there a way to create a filter

[htmltmpl] Comments

2007-03-07 Thread Robert Hicks
In TT I can create a comment like: [%# This is a comment %] The benefit to that is that comment gets stripped out when the template is processed (i.e you don't see it if you source the HTML file from the browser window). Is there a way to create a filter in HT that does the same thing? Rober