[Dbix-class] compose_namespace & C3

Christopher H. Laco claco at chrislaco.com
Tue Jul 11 20:04:38 CEST 2006


I while back, knee deep in Handel-DBIC magicland, I was attempting to
call class->load_components to inject components into a cloned schema.

It was slow as dirt because C# kept getting reinitialized. I tried
several incantations of $TURN_OFF_C3 and uninitialize, and nothing
helped the problem.

Then, while surfing through Schema.pm, I noticed this nugget in
compose_namespace:


{
   local *Class::C3::reinitialize = sub { };
   ...
}
Class::C3->reinitialize;


How curious. I suspect that if I did the same, it would work as
expected, rather than figthing $TURN_OF_C3.


Can the creator of this magic shed any light on the matter?

Thanks,
-=Chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060711/33485be8/attachment.pgp 


More information about the Dbix-class mailing list