r8199@h460878c2 (orig r10013): rkinyon | 2007-09-28 12:05:34 -0400
[dbsrgits/DBM-Deep.git] / t / 39_singletons.t
CommitLineData
867a26a0 1use strict;
888453b9 2use Test::More tests => 5;
867a26a0 3use Test::Deep;
4use t::common qw( new_fh );
5
6use_ok( 'DBM::Deep' );
7
8my ($fh, $filename) = new_fh();
9my $db = DBM::Deep->new(
10 file => $filename,
11 locking => 1,
12 autoflush => 1,
13);
14
15$db->{foo} = { a => 'b' };
16my $x = $db->{foo};
17my $y = $db->{foo};
18
19print "$x -> $y\n";
20
fb451ba6 21TODO: {
888453b9 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}
888453b9 29is( $db->{foo}, undef );