Branch Coverage

blib/lib/SeeAlso/Source.pm
Criterion Covered Total %
branch 44 88 50.0


line true false branch
21 12 6 if ref $_[0] eq 'CODE' or UNIVERSAL::isa($_[0], 'SeeAlso::Source')
23 0 18 if UNIVERSAL::isa($_[0], 'Cache')
24 14 4 unless defined $_[0]
31 6 12 unless defined $callback
32 18 0 unless defined $cache
34 14 4 if $callback
35 0 18 if $cache
36 4 14 if %params
45 14 24 if (scalar @_)
48 0 14 if defined $callback and ref $callback ne 'CODE' and not UNIVERSAL::isa($callback, 'SeeAlso::Source')
55 0 38 unless defined $$self{'callback'}
56 36 2 if ref $$self{'callback'} eq 'CODE'
64 0 0 if (scalar @_)
65 0 0 unless not defined $_[0] or UNIVERSAL::isa($_[0], 'Cache') or UNIVERSAL::isa($_[0], 'SeeAlso::Source')
79 3 21 unless UNIVERSAL::isa($identifier, 'SeeAlso::Identifier')
84 0 24 if ($$self{'cache'} and not $params{'force'})
85 0 0 if (UNIVERSAL::isa($$self{'cache'}, 'Cache')) { }
87 0 0 if defined $response
90 0 0 if $response->size
96 0 22 unless UNIVERSAL::isa($response, 'SeeAlso::Response')
99 0 22 if ($$self{'cache'})
100 0 0 if (UNIVERSAL::isa($$self{'cache'}, 'Cache')) { }
113 24 0 $$self{'callback'} ? :
123 14 26 if (scalar @_ > 1) { }
20 6 elsif ($$self{'description'}) { }
126 19 0 defined $param{$key} ? :
127 0 19 if ($key =~ /^Examples?$/) { }
128 0 0 unless ref $value eq 'ARRAY'
134 9 10 if ($$self{'description'}) { }
142 19 1 if defined $key
145 1 5 if defined $key
159 1 1 unless defined $name
160 1 1 unless defined $description
161 1 1 unless defined $url
169 0 0 if (UNIVERSAL::isa($_[0], 'SeeAlso::Source')) { }
172 0 0 if ref $_[0] eq 'CODE'
196 29 0 unless defined $$config{'config'}
199 0 0 if (ref $cfg eq 'HASH') { }
204 0 0 if ($file =~ /\.ini$/) { }
0 0 elsif ($file =~ /\.y[a]?ml$/) { }
0 0 elsif ($file =~ /\.json$/) { }
228 0 0 if $@
230 0 0 unless ref $cfg eq 'HASH'
232 0 0 unless defined $$config{$hash}