2 use Test::More tests => 11;
4 use t::common qw( new_fh );
9 my ($fh, $filename) = new_fh();
10 my $db = DBM::Deep->new(
17 $db->{foo} = { a => 'b' };
21 is( $x, $y, "The references are the same" );
24 is( $x, undef, "After deleting the DB location, external references are also undef (\$x)" );
25 is( $y, undef, "After deleting the DB location, external references are also undef (\$y)" );
26 is( $x + 0, undef, "DBM::Deep::Null can be added to." );
27 is( $y + 0, undef, "DBM::Deep::Null can be added to." );
28 is( $db->{foo}, undef, "The {foo} location is also undef." );
30 # These shenanigans work to get another hashref
31 # into the same data location as $db->{foo} was.
37 is( $x, undef, "After re-assigning to {foo}, external references to old values are still undef (\$x)" );
38 is( $y, undef, "After re-assigning to {foo}, external references to old values are still undef (\$y)" );
42 skip "What do we do with external references and txns?", 2;
43 my ($fh, $filename) = new_fh();
44 my $db = DBM::Deep->new(
51 $db->{foo} = { a => 'b' };
56 $db->{foo} = { c => 'd' };
59 # XXX What should happen here with $x and $y?