Commit | Line | Data |
867a26a0 |
1 | use strict; |
3300d0b3 |
2 | use Test::More tests => 5; |
867a26a0 |
3 | use Test::Deep; |
4 | use t::common qw( new_fh ); |
5 | |
6 | use_ok( 'DBM::Deep' ); |
7 | |
8 | my ($fh, $filename) = new_fh(); |
9 | my $db = DBM::Deep->new( |
10 | file => $filename, |
11 | locking => 1, |
12 | autoflush => 1, |
13 | ); |
14 | |
15 | $db->{foo} = { a => 'b' }; |
16 | my $x = $db->{foo}; |
17 | my $y = $db->{foo}; |
18 | |
19 | print "$x -> $y\n"; |
20 | |
fb451ba6 |
21 | TODO: { |
3300d0b3 |
22 | local $TODO = "Singletons are unimplmeneted yet"; |
23 | is( $x, $y, "The references are the same" ); |
24 | |
25 | delete $db->{foo}; |
26 | is( $x, undef ); |
27 | is( $y, undef ); |
fb451ba6 |
28 | } |
3300d0b3 |
29 | is( $db->{foo}, undef ); |