[Templates] Template::Plugin::Class -- error with dynamic arg.

[prev] [thread] [next] [Date index for 2005/02/07]

From: Bart Simpson
Subject: [Templates] Template::Plugin::Class -- error with dynamic arg.
Date: 22:05 on 07 Feb 2005
Using T::P::Class, if i say:
[% USE class = Class(myhash.$mykey) %] 

usiing a variable as argument and then call a method
with class
[% class.mymethod %]

in one template i get  this error:
undef error - Can't call method "accessor_classes"
without a package or object reference at
/usr/lib/perl5/site_perl/5.8.5/Template/Plugin/Class.pm
line 35.

.

while in another template with same USE statement.
it works. 

If i hardcode a the classname in the argument, it
works. 

Someone addressed this on Maypole and CDBI lists but
the problem  wasn't talked about unfortuneately. 

http://lists.netthink.co.uk/pipermail/maypole/2004-September/000688.html

Anyone know why this happens? 

thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Image plugin
Tosh Cooey 18:20 on 07 Feb 2005

Re: [Templates] Image plugin
Perrin Harkins 20:52 on 07 Feb 2005

[Templates] Template::Plugin::Class -- error with dynamic arg.
Bart Simpson 22:05 on 07 Feb 2005

Re: [Templates] Image plugin
Harry Jackson 10:49 on 08 Feb 2005

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