Catmandu/Store/Multi.pm

filter: Statementstmt 81.8% 27 / 33 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 1 totaltotal 77.7% 35 / 45 CC 3 SCAR 7.9
CC
3
Cov
80%
drop
6.0
__ANON__
2.1
__ANON__
2.0
CRAP 2.2
« Catmandu/Fix/Condition.pm ↑ Summary Catmandu/Fix/lookup_in_store.pm »
1 package Catmandu::Store::Multi;
2  
3 1 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '1.2025';
6  
7 1 ▶use Catmandu::Util qw(:is);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Hash::Util::FieldHash qw(fieldhash);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Catmandu::Store::Multi::Bag;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 with 'Catmandu::Store';
14 1 with 'Catmandu::Droppable';
15  
16 has stores => (
17 is => 'ro',
18 required => 1,
19 0 ▶ default => sub {[]},
Subroutine __ANON__: not called CC=1 SCAR=6.9
20 1 ▶ coerce => sub {
Subroutine __ANON__: called CC=2 SCAR=7.4
21 1 my $stores = $_[0];
22 return [
23 map {
24 1 ▶ if (is_string($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (is_string($_)) { } 0 2 2
25 0 Catmandu->store($_);
26 }
27 else {
28 2 $_;
29 }
30 } @$stores
31 ];
32 },
33 1 );
34  
35 0 ▶sub drop {
Subroutine drop: not called CC=2 SCAR=17.9
Pod undocumented
36 0 my ($self) = @_;
37 0 for my $store (@{$self->stores}) {
38 0 $store->drop;
39 }
40 }
41  
42 1 1;
43  
44 __END__
« Catmandu/Fix/Condition.pm ↑ Summary Catmandu/Fix/lookup_in_store.pm »