[Catalyst] reserved words

John Napiorkowski jjn1056 at yahoo.com
Tue Mar 6 18:46:38 GMT 2007



----- Original Message ----
From: Octavian Rasnita <orasnita at gmail.com>
To: catalyst at lists.rawmode.org
Sent: Tuesday, March 6, 2007 12:02:39 PM
Subject: [Catalyst] reserved words

Hi,

Please tell me how can I find the list of reserved words that cannot be used 
as names for views, controllers, models, $c->stash elements...

For example I have seen that the name of the application is also found in 
$c->stash->{name}. $c->stash->{template} is also special.

I have also tried to create a view with the name "Show", and I have received 
the following error in the browser:

Caught exception in TranzactiiBursiere::View::Show->process 
"TranzactiiBursiere::View::Show directly inherits from Catalyst::View. You 
need to
inherit from a subclass like Catalyst::View::TT instead.

If I changed the name of that view to "Html", it worked fine, with no 
errors...

Thank you.

Octavian

I didn't know about the "Show" issue that you mentioned but AFAIK there are not really global reserved stuff.  'template' is used by the TT view to set the path to the template so you have to be careful with that.  I think the 'template' think bit me once as well.  That's really the only stash key I can think of that's special, but if you use something other than TT you should check the docs.

--john


_______________________________________________
List: Catalyst at lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/





 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 



More information about the Catalyst mailing list