"eval { $obj->isa( 'DBM::Deep' ) }".
- The various methods like push and delete now have the same return values as
the standard builtins.
+ - TIEARRAY and TIEHASH now check their parameters more thoroughly
0.96 Oct 14 09:55:00 2005 Pacific
- Fixed build (OS X hidden files killed it)
ok( exists $hash{key1}, "... and it's key1" );
}
-TODO: {
- local $TODO = "Sig doesn't match, but it's legal??";
- my @array;
- throws_ok {
- tie @array, 'DBM::Deep', {
- file => 't/test.db',
- type => DBM::Deep->TYPE_ARRAY,
- };
- } qr/DBM::Deep: Cannot open a hash-based file with an array/, "\$SIG_TYPE doesn't match file's type";
-
- unlink "t/test.db";
- DBM::Deep->new( file => 't/test.db', type => DBM::Deep->TYPE_ARRAY );
+throws_ok {
+ tie my @array, 'DBM::Deep', {
+ file => 't/test.db',
+ type => DBM::Deep->TYPE_ARRAY,
+ };
+} qr/DBM::Deep: File type mismatch/, "\$SIG_TYPE doesn't match file's type";
- my %hash;
- throws_ok {
- tie %hash, 'DBM::Deep', {
- file => 't/test.db',
- type => DBM::Deep->TYPE_HASH,
- };
- } qr/DBM::Deep: Cannot open a array-based file with a hash/, "\$SIG_TYPE doesn't match file's type";
-}
+unlink "t/test.db";
+DBM::Deep->new( file => 't/test.db', type => DBM::Deep->TYPE_ARRAY );
+
+throws_ok {
+ tie my %hash, 'DBM::Deep', {
+ file => 't/test.db',
+ type => DBM::Deep->TYPE_HASH,
+ };
+} qr/DBM::Deep: File type mismatch/, "\$SIG_TYPE doesn't match file's type";