> I have a homemade object, $u, which I pass from a cgi to a template:
> $vars->{"user"} = $u;
> $tt->process("template", $vars);
>
> In the template, I'm trying to access the objects attributes, for example:
> [% user.username %]
>
> (with this object, in a script I would access that attribute using
> $u->{"username"})
>
If $u is a perl object (a "blessed" thing), then the toolkit translates
user.username into the method call $u->username().
You could either pass a hash reference instead of an object to
$vars->{"user"} or define an object method within $u's package:
sub username {$_[0]->{"username"}}
--
HTH,
haj