Condition Coverage

blib/lib/Resource/Silo/Metadata.pm
Criterion Covered Total %
condition 62 72 86.1


and 3 conditions

line !l l&&!r l&&r condition
101 1 1 154 defined $name and not ref $name
2 3 151 defined $name and not ref $name and $name =~ /$ID_REX/i
134 7 2 0 defined $spec{$_} and croak("resource '${name}': 'literal' is incompatible with '${_}'")
155 2 1 131 ref $spec{'init'} and builtin::reftype($spec{'init'}) eq $CODE
160 0 0 1 ref $spec{'preload'} eq "ARRAY" and not grep({ref $_;} @{$spec{"preload"};})
184 125 2 2 defined $spec{'check'} and (builtin::reftype($spec{'check'}) // "") ne $CODE
186 122 4 1 defined $spec{'coerce'} and (builtin::reftype($spec{'coerce'}) // "") ne $CODE
188 76 48 2 defined $spec{'cleanup'} and (builtin::reftype($spec{'cleanup'}) // "") ne $CODE
190 107 15 2 defined $spec{'fork_cleanup'} and (builtin::reftype($spec{'fork_cleanup'}) // "") ne $CODE
192 107 14 1 $spec{'fork_cleanup'} and $spec{'fork_safe'}
239 12 1 0 defined $spec->{$_} and croak("resource '${name}': 'class' is incompatible with '${_}'")
261 0 5 1 defined $entry and not ref $entry
266 1 1 4 ref $entry eq "ARRAY" and @$entry <= 2
2 1 3 ref $entry eq "ARRAY" and @$entry <= 2 and ($entry->[0] // "") =~ /$ID_REX/
415 1 0 7 $res and $res->{'origin'}

or 2 conditions

line l !l condition
136 0 2 $spec{'dependencies'} //= []
137 0 2 $spec{'derived'} //= 1
138 0 2 $spec{'cleanup_order'} //= "Inf"
166 2 1 builtin::reftype($spec{'argument'}) // ""
179 6 124 $spec{'cleanup_order'} //= 0
184 3 1 builtin::reftype($spec{'check'}) // ""
186 4 1 builtin::reftype($spec{'coerce'}) // ""
188 49 1 builtin::reftype($spec{'cleanup'}) // ""
190 16 1 builtin::reftype($spec{'fork_cleanup'}) // ""
234 7 1 $spec->{'dependencies'} //= {}
266 4 0 $entry->[0] // ""
274 1 2 $entry->[1] // ""

or 3 conditions

line l !l&&r !l&&!r condition
194 14 34 73 $spec{'fork_cleanup'} //= $spec{'cleanup'}