On 17 Aug 2010, at 15:50, Charlie Garrison wrote:
I was suggesting the Moose attribute as way of storing the model in $c to be easier to reference from templates.
I highly recommend taking the model instance and stashing it (as is being done already), rather than making an attribute on the context object, as this is less flexible...
I.e. if you are saying [% c.model('Foo').thing %] or [% c.foo.thing %] then this is less flexible (as you can't override foo for part of your site) than $c->stash(foo => $c->model('Foo')) in your perl code, then [% foo.thing %] in your template.
Cheers t0m _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/