[Templates] Lost in Templation
[prev]
[thread]
[next]
[Date index for 2004/06/17]
I'm am once again totally confused by the errors I'm getting when doing a
_very_ simple process.
Here is the abbreviated code.
my $sut =
Template->new({INCLUDE_PATH => ['/root/bin/templates/']});
my $filename = 'largemail.tt';
my $msgbody = '';
$sut->process($filename, \$Size, \$msgbody)
|| die $sut->error();
If I change the array reference '\$msgbody' to a simple scalar '$msgbody'
I get the filled in template returned to the screen.
'\$Size' is a global and actually an array but using '\%Size' gives me
errors also but more of them :-(.
So here is the error I'm getting while running the whole script through
the debugger. Of all htepermutations I tried this gave me
the shortest error message. Where have I gone wrong?
Not a HASH reference at /usr/lib/perl5/site_perl/5.8.0/Template/Service.pm
line 79.
Template::Service::process('Template::Service=HASH(0x8554848)','largemail.tt','SCALAR(0x893fb20)')
called at /usr/lib/perl5/site_perl/5.8.0/Template.pm line 76
Template::process('Template=HASH(0x85546bc)','largemail.tt','SCALAR(0x893fb20)','SCALAR(0x893fac0)')
called at newChkSize.pl line 90
main::gen_report() called at newChkSize.pl line 63
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] Lost in Templation
Roderick A. Anderson 01:15 on 17 Jun 2004
|