On 08/16/2010 09:32 PM, J. Shirley wrote:
> 
> 2010/8/16 Octavian Rasnita <orasn...@gmail.com>:
>> Hi,
>> I have a module that creates an object (a menu) and I want to store it in
>> the stash when the application starts.
>> Where is the recommended place to create this object and store it in the
>> stash if I want that object created just once at app startup?
>> Should I override a certain method in MyApp.pm and create the object there?
>> Thanks.
> 
> That sounds exactly like a model class.

I agree and would like to add: If it's about providing some value for a
view no matter where it comes from, it might be best to extend the view
to stash the variable prior to rendering.

regards,
-- 
Robert 'phaylon' Sedlacek

Perl 5 Consultant for
Shadowcat Systems Limited - http://shadowcat.co.uk/

_______________________________________________
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/

Reply via email to