teddyttas has asked for the wisdom of the Perl Monks concerning the following question:
Hi all!
I'm new on this forum and I still don't know it very well. It seems cool anyway. I hope you guys can help with a little difficulty. I'm trying to develop a little application for the web.
I began using CGI and everything was good, but then I felt on some articles talking about cgi:: application and html::templates. I wanted to test this modules, but I can't make them work.
As for now, I've installed HTML::template, but when I run a script, I get the following errors:
[Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] Premature end of + script headers: helloworld.tmpl.pl [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] Bad name after p +rivlibexp' at C:/wamp/perl/lib/Config.pm line 1219.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] Compilation fail +ed in require at C:/wamp/perl/lib/DynaLoader.pm line 25.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] BEGIN failed--co +mpilation aborted at C:/wamp/perl/lib/DynaLoader.pm line 25.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] Compilation fail +ed in require at C:/wamp/perl/lib/Digest/MD5.pm line 12.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] Compilation fail +ed in require at C:/wamp/perl/lib/HTML/Template.pm line 1035.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] BEGIN failed--co +mpilation aborted at C:/wamp/perl/lib/HTML/Template.pm line 1035.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] Compilation fail +ed in require at C:/wamp/www/helloworld.tmpl.pl line 6.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] BEGIN failed--co +mpilation aborted at C:/wamp/www/helloworld.tmpl.pl line 6.\r [Wed Oct 10 11:26:33 2012] [error] [client 127.0.0.1] File does not ex +ist: C:/wamp/www/favicon.ico, referer: http://localhost/helloworld.tm +pl.pl
The code is simple and I found it on the net, just to test if the module worked, but it doesn't. I'm not an expert, but I think that mine is a module's configuration problem.
#!c:/wamp/perl/bin/perl.exe ## ## HTML template Hello World ## use strict; use HTML::Template; my $that_famous_string = 'Hello, world!'; # open the html template my $template = HTML::Template->new(filename => 'helloworld.tmpl.html') +; # fill in some parameters $template->param(THAT_FAMOUS_STRING => $that_famous_string); # send the obligatory Content-Type print "Content-type: text/html\n\n"; # print the template print $template->output;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: problem installing HTML::Template
by Anonymous Monk on Oct 10, 2012 at 10:49 UTC | |
by teddyttas (Novice) on Oct 10, 2012 at 10:56 UTC | |
by Anonymous Monk on Oct 10, 2012 at 11:00 UTC | |
by teddyttas (Novice) on Oct 10, 2012 at 11:03 UTC | |
Re: problem installing HTML::Template
by Khen1950fx (Canon) on Oct 10, 2012 at 14:36 UTC |
Back to
Seekers of Perl Wisdom