Re: [Templates] Lost in Templation

[prev] [thread] [next] [Date index for 2004/06/17]

From: Mark Mills
Subject: Re: [Templates] Lost in Templation
Date: 01:51 on 17 Jun 2004
$sut->process($filename, $Size, \$msgbody) if (ref $Size eq "HASH");

And yes, after the pun in your Subject line you deserve a one line 
suggestion in perlish... that is top-posted, even.

;)

--mark

Roderick A. Anderson wrote:

> 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

_______________________________________________
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

Re: [Templates] Lost in Templation
Mark Mills 01:51 on 17 Jun 2004

Re: [Templates] Lost in Templation
Roderick A. Anderson 18:20 on 17 Jun 2004

Re: [Templates] Lost in Templation
Roderick A. Anderson 20:23 on 17 Jun 2004

Re: [Templates] Lost in Templation
Jeff Anderson 01:44 on 18 Jun 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52