[Templates] Carp error
Tim Dolezal
tdolezal@ces-inc.cc
Thu, 2 Jan 2003 12:39:06 -0800
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C2B25B.F10ACC60
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I am trying to get my first template up and I keep getting a
"Template::Exception at C:/Perl/lib/CGI/Carp.pm line 301." error.
I am using the TT2 tutorial as my guide. And yes I have read all the
docs, and yes I have probably missed something in the docs.
I have a hashed hash I am trying to output.
--> partial code <--
my $tt = Template->new({
INCLUDE_PATH => 'C:\\apache\\htdocs\\eaglevision\\templates',
INTERPOLATE => 1,
}) || die "$Template::ERROR ";
my %data = ( name => 'Eagle Vision',
ibos => \%ibos );
# display data
$tt->process('vision/ibo.tpl', \%data)
|| die $tt->error();
--> end <--
--> template file <--
Name - [% name %]
[% FOREACH ibo = ibos %]
[% ibo.IBONumber %] [% ibo.UplineIBONumber %] [% ibo.IBOActive %] [%
ibo.IBOPin %] [% ibo.FirstName %] [% ibo.MI %] [% ibo.LastName %] [%
ibo.SpouseType %] [% ibo.CreateDate %] [% ibo.ModifyDate %] [%
ibo.ModifiedBy
[% END %]
--> end <--
When I pound out the template code, the script runs fine.
Tim
------=_NextPart_000_0011_01C2B25B.F10ACC60
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>I am =
trying to get=20
my first template up and I keep getting a "Template::Exception at=20
C:/Perl/lib/CGI/Carp.pm line 301." error. </FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>I am =
using the TT2=20
tutorial as my guide. And yes I have read all the docs, and yes I have =
probably=20
missed something in the docs.</FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>I have =
a hashed hash=20
I am trying to output.</FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>--> =
partial code=20
<--</FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial =
size=3D2> my $tt =3D=20
Template->new({<BR> INCLUDE_PATH =3D>=20
'C:\\apache\\htdocs\\eaglevision\\templates',<BR> INTERPOLATE&=
nbsp;=20
=3D> 1,<BR> }) || die "$Template::ERROR ";</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial =
size=3D2> my %data =3D (=20
name =3D> 'Eagle=20
Vision',<BR> &=
nbsp; =20
ibos =3D> \%ibos );<BR># display=20
data<BR> $tt->process('vision/ibo.tpl', =
\%data)<BR> || die=20
$tt->error();<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>--> =
end=20
<--</FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>--> =
template file=20
<--</FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>Name - =
[% name=20
%]</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>[% =
FOREACH ibo =3D=20
ibos %]<BR> [% ibo.IBONumber %] [% ibo.UplineIBONumber %] [% =
ibo.IBOActive=20
%] [% ibo.IBOPin %] [% ibo.FirstName %] [% ibo.MI %] [% ibo.LastName %] =
[%=20
ibo.SpouseType %] [% ibo.CreateDate %] [% ibo.ModifyDate %] [%=20
ibo.ModifiedBy<BR>[% END %]<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>--> =
end=20
<--</DIV></FONT></SPAN>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial size=3D2>When I =
pound out the=20
template code, the script runs fine.</FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2>Tim</FONT></SPAN></DIV>
<DIV><SPAN class=3D042243120-02012003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV></BODY></HTML>
------=_NextPart_000_0011_01C2B25B.F10ACC60--