M
Martin Kissner
Hello together,
I had some trouble with HTML::Template, do I added some "warn" commands
to my script to find the error.
After I had fixed my script I still got warnings in the error log of my
webserver.
Why do I get these warnings also when the command before "or warn ..."
was successfuly executed?
Here is a short sample:
----- start -----
#!/usr/bin/perl
use strict;
use warnings;
use HTML::Template;
print "Content-Type: text/html\n\n";
my $template = HTML::Template->new(filename =>
"template.html");
my $title = "My Title";
##### here comes the questionable line ######
$template->param(TITLE => $title) or warn ("param failed\n");
print $template->output;
----- end -----
Thanks in advance
Best regards
Martin
I had some trouble with HTML::Template, do I added some "warn" commands
to my script to find the error.
After I had fixed my script I still got warnings in the error log of my
webserver.
Why do I get these warnings also when the command before "or warn ..."
was successfuly executed?
Here is a short sample:
----- start -----
#!/usr/bin/perl
use strict;
use warnings;
use HTML::Template;
print "Content-Type: text/html\n\n";
my $template = HTML::Template->new(filename =>
"template.html");
my $title = "My Title";
##### here comes the questionable line ######
$template->param(TITLE => $title) or warn ("param failed\n");
print $template->output;
----- end -----
Thanks in advance
Best regards
Martin