Catmandu

 view release on metacpan or  search on metacpan

t/Catmandu-Store-Hash.t  view on Meta::CPAN

is_deeply $bag->first, {_id => '321', name => 'Nicolas', age => '34'},
    "Data package ok.";
is $bag->count, 1, "Count bag size";
$bag->delete_all;
is $bag->count,   0, "Count bag size";
isnt $bag->count, 1, "Count bag size";

$bag->add({_id => '123', foo => "bar"});

my $bag2 = $store->bag;
is $bag2->count, 1, "Bags stay alive";

my $bag3 = $store->bag('foo');
ok !$bag3->get('123'), "foo doesnt have 123";

done_testing;



( run in 1.287 second using v1.01-cache-2.11-cpan-39bf76dae61 )