[Catalyst] putting an object in the stash

Daniel McBrearty danielmcbrearty at gmail.com
Tue Mar 13 12:31:52 GMT 2007


> If I do that, the values from $obj hash reference are not put in the
> template like when $obj is a reference to a common hash.
>

Impossible to know what you mean here without an example of the
template, but I commonly put DBIC objects on the stash, and call
methods on them with the dot operator in TT. TT is smart enough to
work out what needs to be done and do it

so whether the underlying code is

$obj->element;

or

$obj->{element};

[%- obj.element -%]

works. (Maybe it always uses the second version - as I've never had a
problem, I've never looked ...

So I don't really get what the problem is here.

-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list