X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F27_filehandle.t;h=11f9eca8fba7dc95890f3c55a39c76bbba7f4169;hb=6e78585cfdedc2754b455639da5cc877d7f25cab;hp=810154d4bdf1f38279cebe7681fbf7bc870170fe;hpb=9a63e1f2f9055c891cc9f77336841d38867e15c8;p=dbsrgits%2FDBM-Deep.git diff --git a/t/27_filehandle.t b/t/27_filehandle.t index 810154d..11f9eca 100644 --- a/t/27_filehandle.t +++ b/t/27_filehandle.t @@ -20,16 +20,14 @@ use_ok( 'DBM::Deep' ); { open(my $fh, '<', $filename) || die("Can't open '$filename' for reading: $!\n"); - my $db; - # test if we can open and read a db using its filehandle - ok(($db = DBM::Deep->new(fh => $fh)), "open db in filehandle"); - ok($db->{hash}->{foo}->[1] eq 'b', "and get at stuff in the database"); + my $db; + ok( ($db = DBM::Deep->new( fh => $fh )), "open db in filehandle" ); + ok( $db->{hash}{foo}[1] eq 'b', "and get at stuff in the database" ); throws_ok { $db->{foo} = 1; - } qr/Cannot write to a readonly filehandle/, - "Can't write to a read-only filehandle"; + } qr/Cannot write to a readonly filehandle/, "Can't write to a read-only filehandle"; ok( !$db->exists( 'foo' ), "foo doesn't exist" ); my $db_obj = $db->_get_self;