[Catalyst] How does config work?

Christopher H. Laco claco at chrislaco.com
Fri Aug 12 21:09:12 CEST 2005


How does config work in modules other than MyApp root?

Maybe I'm doing something wrong, but if I set:

MyApp->config(foo =>'bar'), it's available in TT as c.config.foo

The same doesn't seem to be true within a view, controller or model:

	MyApp::C::Email;
	__PACKAGE->config(emailfoo => 'bar');

	sub doit : Global {

	};

Then in TT:  c.config.emailfoo during a request to /doit gets me 
nothing. What am I doing wrong?

I see WritingPlugins mentions that it's good practice to save module 
specific config in a seperate module-named hash under config... where 
does config information go when I do this in a an M, V, C that's not the 
root...

__PACKAGE->config(a -> 'b');

-=Chris

	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20050812/108efc70/smime.bin


More information about the Catalyst mailing list