Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
But this creates an error:#!/usr/bin/perl use HTML::Template; my @html = <DATA>; my $template = HTML::Template->new( arrayref => \@html); print $template->output; __DATA__ <html> <head> </head> <body> <TMPL_VAR NAME=VALUE> </body> </html>
output:package Foo; use HTML::Template; sub run{ my @html = <DATA>; my $template = HTML::Template->new(arrayref => \@html); print $template->output; } 1; __DATA__ <html> <head> </head> <body> <TMPL_VAR NAME=VALUE> </body> </html>
HTML::Template->new() : Syntax error in <TMPL_*> tag at /fake/path/for +/non/file/template : 5. at /usr/lib/perl5/site_perl/5.8.0/HTML/Templa +te.pm line 2243, <DATA> line 7.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::Template in a module's __DATA__ section
by shenme (Priest) on Sep 12, 2004 at 01:29 UTC | |
by Anonymous Monk on Sep 12, 2004 at 01:46 UTC | |
|
Re: HTML::Template in a module's __DATA__ section
by ikegami (Patriarch) on Sep 12, 2004 at 00:59 UTC | |
by Anonymous Monk on Sep 12, 2004 at 01:34 UTC |