[Dbix-class] Molesting Schemas

Christopher H. Laco claco at chrislaco.com
Mon Jun 5 20:17:06 CEST 2006


Matt S Trout wrote:
[snip]
>> Very true, although that only solves the problem for people who specify
>> a schema_class, and I create the schema_instance. For people who
>> actually pass in their existing schema_instance, my only choice is to
>> work in its original classes.
>>   
> 
> Why? Doing a compose_namespace clones the schema so the connection will
> come with it.Works fine as an object method as well as a class method too.
> 
> 

Just for the sake of asking. If I use compose_namespace twice in two
different subclasses to create something common like
Handel::Schema::Custom, I'll end up with the same problem; altering one
will effect the other.

The obvious answer us that each time I use compose_namespace, I should
make each $target_namespace unique. Any suggestions on the best way to
do that? I could swear there was a Class:: module for this on CPAN that
made a package name with some ::_ANON263455_ appended to the end type
magic, but I can't seem to find it.

-=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/20060605/37bb2330/attachment-0001.pgp 


More information about the Dbix-class mailing list