From: rkinyon Date: Thu, 2 Mar 2006 16:30:47 +0000 (+0000) Subject: Removed warning, but left test directory X-Git-Tag: 0-99_01~87 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a8ac017aa133fe3fd139ee649f03352149cedf1;p=dbsrgits%2FDBM-Deep.git Removed warning, but left test directory --- diff --git a/t/21_tie_access.t b/t/21_tie_access.t index e8cce37..d911788 100644 --- a/t/21_tie_access.t +++ b/t/21_tie_access.t @@ -8,7 +8,7 @@ use File::Temp qw( tempfile tempdir ); use_ok( 'DBM::Deep' ); -my $dir = tempdir( CLEANUP => 1 ); +my $dir = tempdir(); my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir ); { @@ -29,12 +29,14 @@ my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir ); ok( exists $hash{key1}, "... and it's key1" ); } -throws_ok { - tie my @array, 'DBM::Deep', { - file => $filename, - type => DBM::Deep->TYPE_ARRAY, - }; -} qr/DBM::Deep: File type mismatch/, "\$SIG_TYPE doesn't match file's type"; +{ + throws_ok { + tie my @array, 'DBM::Deep', { + file => $filename, + type => DBM::Deep->TYPE_ARRAY, + }; + } qr/DBM::Deep: File type mismatch/, "\$SIG_TYPE doesn't match file's type"; +} { my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );