On Wed, Jul 18, 2001 at 06:01:23PM +0200, Joerg, Harald wrote:
> If $u is a perl object (a "blessed" thing), then the toolkit translates
> user.username into the method call $u->username().
....and if that method isn't found, then it should attempt to access
it as $u->{'user'} (assuming the underlying object is a hash ref).
So it should work as expected, but there might be something in the
object which is preventing this from happening (e.g. an existing
'username' method or an AUTOLOAD method, perhaps).
Here's an example showing how it should work:
[abw@gemini abw]$ perl -MTemplate \
-e 'Template->new(EVAL_PERL => 1)->process(\*STDIN)'
[% PERL %]
$stash->set( me => bless { name => 'abw' }, 'user' );
[% END %]
me: [% me.name %]
^D
and it generates:
me: abw
HTH
A
--
Andy Wardley <[EMAIL PROTECTED]> Signature regenerating. Please remain seated.
<[EMAIL PROTECTED]> For a good time: http://www.kfs.org/~abw/