Associate is only for objects that have a 'param' method. What you are
passing in is a hash ref. If you want the hashref data available as
template vars you should do
my $body = $self->load_tmpl('pwm_orderdetail.html');
$body->param($r);
return $body;
----- Original Message -----
From: "Joel Gwynn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 10:43 AM
Subject: [cgiapp] another HTML::Template question Part II
> OK. I thought I had it. Now, I'm trying to pass a hash reference to
> load_tmpl, like so:
>
> my $od = $dbh->prepare($sql);
> $od->execute;
> my $r = $od->fetchrow_hashref;
> my $body = $self->load_tmpl('pwm_orderdetail.html', associate => $r);
>
> But I get this error:
>
> Can't call method "can" on unblessed reference at
> c:/Perl/site/lib/HTML/Template.pm line 781.
>
> What would be the syntax for this?
>
> Thanks much.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]