[Catalyst] Initialization ordering, how?
Dominique Quatravaux
dom at idealx.com
Thu Jun 30 15:40:23 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Storrs a écrit :
>
> On Jun 30, 2005, at 8:12 AM, Dominique Quatravaux wrote:
>
>> [can't ensure that persistence layer was loaded first] What
>> should I do ?
>
>
> Well...presumably, your module always knows which layer it is
> using. Is there any reason you couldn't load it yourself? (I
> have a feeling that's a really dumb question on my part, but
> please forgive me if so.)
>
Unfortunately just use'ing Foo::M::CDBI is not enough, it's singleton
has to be initialized too just like Catalyst::Setup would do (in
Catalyst::Setup::setup_components) in order for the persistence aspect
of model classes to be initialized by Class::DBI. I dare not invoke
Foo::M::CDBI->new() myself, as it would break singletonness (since
Catalyst::Setup::setup_components is about to invoke
Foo::M::CDBI->new() again once Foo::M::Bar is done loading).
- --
Dominique QUATRAVAUX Ingénieur senior
01 44 42 00 08 IDEALX
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCw/ZGMJAKAU3mjcsRAnDXAJ4lfW/uq+wdCHa0wCQT3vKKg7vx8gCbBBU5
MVCzGc9jPlTdNzT3eXyqSLE=
=CIoh
-----END PGP SIGNATURE-----
More information about the Catalyst
mailing list