Thanks for the feedback.  Before I get started on the html::template
tutorial, I wanted to try a quick sample page using html::template.
However, when I try it, I cannot get the tag in the html to process.  Could
someone take a look and let me know what you think I am doing incorrectly?

########################################

This is the .pl file

#! /usr/bin/perl -w
# nationalConsumerShoppingSurveyResults.pl

use strict;
use lib qw(/home/ahughes/myLibrary);
use CGI qw(:standard escape escapeHTML);
use CGI::Carp qw(fatalsToBrowser);
use HTML::Template;


my $bar = 'World';
my $template = HTML::Template->new(filename => 'results.tmpl');
$template->param(SECRET_MESSAGE => $bar);
print $template->output;

########################################

This is the .tmpl file:

<!-- results.tmpl -->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<h1>Hello <TMPL_VAR NAME=SECRET_MESSAGE></h1>

</body>
</html>

########################################

When I view the source of results I see the tag "<TMPL_VAR
NAME=SECRET_MESSAGE>" where I expect to see "World".

Any thoughts?

Andrew


-----Original Message-----
From: fliptop [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 7:07 AM
To: Hughes, Andrew
Cc: '[EMAIL PROTECTED]'
Subject: Re: cgi.pm generate html vs. print <<EndOfHTML;


On Wed, 15 Jan 2003 at 21:11, Hughes, Andrew opined:

HA:does anyone have any strong feelings (know of tutorials) toward an
HA:altrnative method like html::template or html::mason?  Any and all
HA:suggestions are greatly appreciated.

http://www.peacecomputers.com/addressbook/step5.html

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to