Don't ask to ask, just ask | |
PerlMonks |
Re: Making a Class::DBI object referenceby edoc (Chaplain) |
on Apr 03, 2004 at 13:22 UTC ( [id://342292]=note: print w/replies, xml ) | Need Help?? |
ok, how about this.. When you want to create a new object, use 'create'.
When you already have a record in the database you want as an object, use 'retrieve'.
You could say that these two methods replace what you would normally think of as 'new's job, either taking the data from you or from the database to instantiate the object. You can now call methods on your object.
cheers, J
In Section
Seekers of Perl Wisdom
|
|