[prev] [thread] [next] [Date index for 2005/08/16]
--===============0666117943== Content-Type: multipart/alternative; boundary="----=_Part_1316_30030190.1124215418828" ------=_Part_1316_30030190.1124215418828 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This seems to be a bug: my $obj1 =3D CDBI::Table->create({name=3D>"bobo",coolness=3D>"is cool"}); my $obj2 =3D CDBI::Table->retrieve($obj1->id); # prints "[is cool] eq [is cool]" printf('[%s] eq [%s]', $obj1->coolness, $obj2->coolness);=20 $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=20 %Live_Objects hash and this sub isn't ever called during the course of=20 creating a new object. Am I misunderstanding how this feature is supposed t= o=20 work? The docs seem pretty clear that the above should work... Thanks, Brian ------=_Part_1316_30030190.1124215418828 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <span class=3D"gmail_quote"></span>This seems to be a bug:<br> <br> my $obj1 =3D CDBI::Table->create({name=3D>"bobo",coolness= =3D>"is cool"});<br> my $obj2 =3D CDBI::Table->retrieve($obj1->id);<br> <br> # prints "[is cool] eq [is cool]"<br> printf('[%s] eq [%s]', $obj1->coolness, $obj2->coolness); <br> <br> $obj1->coolness("is not cool");<br> $obj2->coolness("is really cool");<br> <br> # prints "[is not cool] eq [is really cool]"<br> printf('[%s] eq [%s]', $obj1->coolness, $obj2->coolness);<br> <br> 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...<br> <br> Thanks,<br><span class=3D"sg"> Brian<br> </span> ------=_Part_1316_30030190.1124215418828-- --===============0666117943== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ClassDBI mailing list ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi --===============0666117943==--
[CDBI] Uniqueness of Objects in memory
|
Generated at 00:10 on 01 Sep 2005 by mariachi v0.52