[Dbix-class] compoase_namespace, add_column, and result_source_instance

Christopher H. Laco claco at chrislaco.com
Sat Jul 8 08:50:40 CEST 2006


And to put this in smaller terms:

> use Handel::Cart::Schema;
> 
> my $schema = Handel::Cart::Schema->connect($ENV{HandelDBIDSN});
> my $new = $schema->compose_namespace('Foo');
> 
> print $schema->class('Items'), "\n";
> print $new->class('Items'), "\n";
> 
> print $schema->class('Items')->result_source_instance, "\n";
> print $new->class('Items')->result_source_instance, "\n";
> 
> print $schema->source('Items'), "\n";
> print $new->source('Items'), "\n";





prints:


> Handel::Schema::Cart::Item
> Foo::Items
> DBIx::Class::ResultSource::Table=HASH(0x1bb09d0)
> DBIx::Class::ResultSource::Table=HASH(0x1bb09d0)
> DBIx::Class::ResultSource::Table=HASH(0x22c3d8c)
> DBIx::Class::ResultSource::Table=HASH(0x24a7bd4)



After a clone, I'd expect the first two outputs to a) not be the same,
and b) possibly match the latter two.


-=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/20060708/c84d1ae3/attachment.pgp 


More information about the Dbix-class mailing list