$self->unlock;
- if ($packed_size) {
- return int(unpack($self->_engine->{long_pack}, $packed_size));
- }
+# if ($packed_size) {
+# return int(unpack($self->_engine->{long_pack}, $packed_size));
+# }
- return 0;
+ return $packed_size;
}
sub STORESIZE {
my $SAVE_FILTER = $self->_storage->{filter_store_value};
$self->_storage->{filter_store_value} = undef;
- my $result = $self->STORE('length', pack($self->_engine->{long_pack}, $new_length), 'length');
+ my $result = $self->STORE('length', $new_length, 'length');
$self->_storage->{filter_store_value} = $SAVE_FILTER;
# XXX What should happen if this fails?
my $blist = $sector->get_bucket_list({
key_md5 => $key_md5,
+ create => 1,
}) or die "How did read_value fail (no blist)?!\n";
my $value_sector = $blist->get_data_for( $key_md5 );
# DBM::Deep Test
##
use strict;
-use Test::More tests => 109;
+use Test::More tests => 108;
use Test::Exception;
use t::common qw( new_fh );
type => DBM::Deep->TYPE_ARRAY
);
-TODO: {
- local $TODO = "How is this test ever supposed to pass?";
- ok( !$db->clear, "If the file has never been written to, clear() returns false" );
-}
-
##
# basic put/get/push
##
# exists
##
ok( $db->exists(1), "The 1st value exists" );
-ok( !$db->exists(0), "The 0th value doesn't exists" );
+ok( $db->exists(0), "The 0th value doesn't exist" );
ok( !$db->exists(22), "The 22nd value doesn't exists" );
ok( $db->exists(-1), "The -1st value does exists" );
ok( !$db->exists(-22), "The -22nd value doesn't exists" );