in reply to Implement Object Persistence (II)
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Implement Object Persistence (II)
by merlyn (Sage) on Apr 29, 2005 at 15:52 UTC | |
by dragonchild (Archbishop) on Apr 29, 2005 at 17:28 UTC | |
by merlyn (Sage) on Apr 29, 2005 at 17:34 UTC | |
by dragonchild (Archbishop) on Apr 29, 2005 at 17:45 UTC |