2 use warnings FATAL => 'all';
6 use t::common qw( new_dbm );
10 my $dbm_factory = new_dbm(
14 while ( my $dbm_maker = $dbm_factory->() ) {
15 my $db = $dbm_maker->();
18 $db->{foo} = { a => 'b' };
22 is( $x, $y, "The references are the same" );
25 is( $x, undef, "After deleting the DB location, external references are also undef (\$x)" );
26 is( $y, undef, "After deleting the DB location, external references are also undef (\$y)" );
27 is( $x + 0, undef, "DBM::Deep::Null can be added to." );
28 is( $y + 0, undef, "DBM::Deep::Null can be added to." );
29 is( $db->{foo}, undef, "The {foo} location is also undef." );
31 # These shenanigans work to get another hashref
32 # into the same data location as $db->{foo} was.
38 is( $x, undef, "After re-assigning to {foo}, external references to old values are still undef (\$x)" );
39 is( $y, undef, "After re-assigning to {foo}, external references to old values are still undef (\$y)" );
43 skip "What do we do with external references and txns?", 2;
45 my $dbm_factory = new_dbm(
50 while ( my $dbm_maker = $dbm_factory->() ) {
51 my $db = $dbm_maker->();
53 $db->{foo} = { a => 'b' };
58 $db->{foo} = { c => 'd' };
61 # XXX What should happen here with $x and $y?