perlquestion
chromatic
I'm curious as to the best (or possible) way to store an existing Perl object in a database. I'd use the [DBI] module.
<p>
What I have are a handful of classes (raw objects with default data) in modules -- things are already defined there. I would be creating new instances of those objects with different data. I'd like to store those in a database.
<p>
One option would be to gather up all of the data in the instance objects, db-ify it, and use the primary key of that row in the db to pull the data out and put it into a newly made object. That's not a bad solution.
<p>
Is there any way I can store new classes and objects in a database without having to use [eval] all the time or write the objects to the normal filesystem and then [require] them?