use DBM::Deep; use Data::Dumper; use Test::More no_plan => 1; package Foo; sub new { my $c = shift; bless { @_ }, $c } package Bar; sub new { my $c = shift; bless { @_ }, $c } package main; my $dbh = DBM::Deep->new( 'db.db' ); my $foo = Foo->new( bar => Bar->new( x => 1 ), ); my $expected = Dumper( $foo ); $dbh->import( foo => $foo ); my $foo2 = $dbh->export( 'foo' ); my $actual = Dumper( $foo2 ); is( $actual, $expected );
The Perfect is the Enemy of the Good.
In reply to Re: Implement Object Persistence (II)
by dragonchild
in thread Implement Object Persistence (II)
by tucano
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |