[CDBI] Uniqueness of Objects in memory

Brian Phillips bpphillips at gmail.com
Tue Aug 16 19:03:38 BST 2005


This seems to be a bug:

my $obj1 = CDBI::Table->create({name=>"bobo",coolness=>"is cool"});
my $obj2 = CDBI::Table->retrieve($obj1->id);

# prints "[is cool] eq [is cool]"
printf('[%s] eq [%s]', $obj1->coolness, $obj2->coolness); 

$obj1->coolness("is not cool");
$obj2->coolness("is really cool");

# prints "[is not cool] eq [is really cool]"
printf('[%s] eq [%s]', $obj1->coolness, $obj2->coolness);

It appears that _init is the only place where an object is added to the 
%Live_Objects hash and this sub isn't ever called during the course of 
creating a new object. Am I misunderstanding how this feature is supposed to 
work? The docs seem pretty clear that the above should work...

Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digitalcraftsmen.net/mailman/private/classdbi/attachments/20050816/fdf2996e/attachment.htm


More information about the ClassDBI mailing list