Re: Copying a Class::Accessor class to a CDBI class (CDBI::Plugin::Temp)

[prev] [thread] [next] [Date index for 2005/05/24]

From: Christopher Laco
Subject: Re: Copying a Class::Accessor class to a CDBI class (CDBI::Plugin::Temp)
Date: 13:07 on 24 May 2005
> I've been successfully using:
>=20
>   my $obj =3D My::Foo->construct({ ... });
>=20
> to make a in-memory object.  Then when I want to "make it real",
> it's just
>=20
>   $obj =3D $obj->copy; # make it real
>=20
> This "works".  Am I doing something likely to break in future releases?  =
It
> seemed trivially elegant. :)

Hmmmm. What does "make it real" mean in this case?

In the original thred, I thought it was said that while construct()
created the objects from data, CDBI still expected the data to already
be in the database (aka it would update the record, not insert the
record after any changes).

In the example above, is there no record in the db backing that
construct() call, and does copy() make a completely new record in the
database?

-=3DChris

Re: Copying a Class::Accessor class to a CDBI class (CDBI::Plugin::Temp)
Christopher Laco 13:07 on 24 May 2005

Generated at 15:51 on 25 May 2005 by mariachi v0.52