On Sunday, October 26, 2003, at 10:30 AM, Cees Hek wrote:
..
or you could write a simple filter that strips out all your comments when you
load the template:
my $filter = sub { my $text_ref = shift; $$text_ref =~ s/\<\<\!\-\-.*?\-\-\>\>//g; };
my $template = HTML::Template->new(filename => $template_file, filter => $filter);
no need to escape all those html chars. The following works for me --
# create new template
my $template = HTML::Template->new(
filename => $template,
global_vars => 1,
loop_context_vars => 1,
filter => sub { $$ =~ s/<!--#.*?-->//g; }
);
------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users