use Storable qw/freeze thaw/; use DBI; use Foo; # replace this with your module name my $object = new Foo; my $dbh = DBI->connect('bar', 'foo', 'foo', 'Oracle') or die "Can't connect: ", DBI->errstr; # store it my $sth = $dbh->prepare(<errstr; insert into objects (id, content) values (?, ?) SQL $sth->execute("foo", freeze $object) or die "Can't execute: ", $dbh->errstr; $sth->finish; # now get it back my $retrieve = $dbh->prepare(<errstr; select content from objects where id = ? SQL $retrieve->execute("foo"); my $content = $retrieve->fetchrow; my $unthawed = thaw $content;