[Catalyst] How does config work?
Christopher H. Laco
claco at chrislaco.com
Fri Aug 12 22:29:09 CEST 2005
Christopher H. Laco wrote:
> Ah, the lightbulb just went off.
>
> ->comp('MyApp::Model::CDBI') returns the module instance, so
> __PACKAGE__->config simply stuffs those things in %{$self} of each
> module...
>
Does __PACKAGE__->config merge the local config with the global config
before stuffing the values into %$self?
In other words, what's the point of doing
__PACKAGE__->config(foo => 'bar');
in the model instead of just doing
$self->{'foo'} = 'bar'
given that I see modules doing
SomeOtherThing->new(%$self)
-------------- 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/f8a20839/smime.bin
More information about the Catalyst
mailing list