
dbix-class at trout
May 10, 2008, 7:20 AM
Post #5 of 5
(273 views)
Permalink
|
|
Re: Variable Catalyst seems to be undefined.
[In reply to]
|
|
On Sat, May 10, 2008 at 12:09:21AM +1000, Kieren Diment wrote: > Catalyst::View::TT uses c.stash.whatever in templates, while > Catalyst::View::TTSite uses Catalyst.stash.whatever Sort of. the TTSite -helper- generates a Catalyst::View::TT subclass with __PACKAGE__->config( ... CATALYST_VAR => 'Catalyst', ... ); and whatever that's set to, that's what your variable's gonna be called. Unless you don't set it at all, in which case it's called 'c'. Personally I prefer 'ctx', so at some point somebody's probably going to take my personal opinion as an official best practice[0] yet again and there'll be a helper that does that as well ;) More seriously, though - if something goes weird in a component in your app, please read the documentation for whatever that component does a 'use base' on - it's -usually- going to be enlightening. [0] If anybody ever finds out who coined the phrase "best practice" please tell me so I can send them a flaming llama turd as an expression of my love of it. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/ _______________________________________________ List: Catalyst[at]lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
|