Branch Coverage

blib/lib/Venus/Container.pm
Criterion Covered Total %
branch 110 146 75.3


line true false branch
20 0 20 if (keys %$data == 1 and exists $data->{'value'})
33 1 47 $name ? :
39 0 40 unless $name
43 3 37 if $cache->{$name}
46 2 35 unless my $service = $services->{$name}
48 4 31 if (my $extends = $service->{'extends'})
55 3 32 $data ? :
58 1 34 if $lifecycle and $lifecycle eq "singleton"
66 1 33 unless $name
70 2 31 exists $value->{$name} ? :
82 6 29 if (my $builder = $service->{'builder'}) { }
1 28 elsif (my $method = $service->{'method'}) { }
1 27 elsif (my $function = $service->{'function'}) { }
1 26 elsif (my $routine = $service->{'routine'}) { }
1 25 elsif (my $constructor = $service->{'constructor'}) { }
97 5 5 if ($inject) { }
108 0 10 if (my $function = $buildspec->{'function'}) { }
10 0 elsif (my $method = $buildspec->{'method'}) { }
0 0 elsif (my $routine = $buildspec->{'routine'}) { }
121 0 10 if ($return eq "class")
124 6 4 if ($return eq "result")
127 4 6 if ($return eq "self")
151 22 3 $space->package->can('new') ? :
167 0 42 if $cache->{$name}
172 40 2 unless $lifecycle
174 1 1 if ($lifecycle eq "eager")
187 0 4 if (my $extends = $right->{'extends'})
195 4 0 if (my $arg1 = $left->{'argument'} or my $arg2 = $right->{'argument'})
196 3 1 if (defined $left->{'argument'} and not ref $arg1 or defined $right->{'argument'} and not ref $arg2) { }
0 1 elsif (defined $left->{'argument'} and ref $arg1 eq 'ARRAY' and (defined $right->{'argument'} and ref $arg2 eq 'ARRAY')) { }
0 1 elsif (defined $left->{'argument'} and ref $arg1 eq 'HASH' and (defined $right->{'argument'} and ref $arg2 eq 'HASH')) { }
198 3 0 if $arg1
209 0 1 if $arg1
221 7 29 if ($prop and $prop_as) { }
222 0 7 if (lc $prop_as eq "array" or lc $prop_as eq "arrayref")
223 0 0 if (ref $prop eq 'HASH') { }
230 5 2 if (lc $prop_as eq "hash" or lc $prop_as eq "hashref")
231 0 5 if (ref $prop eq 'ARRAY') { }
238 2 5 if (lc $prop_as eq "list")
239 0 2 if (ref $prop eq 'ARRAY') { }
1 1 elsif (ref $prop eq 'HASH') { }
251 22 7 if defined $prop
263 0 45 if (ref $props eq "ARRAY")
268 18 27 if (ref $props eq "HASH" and keys %$props == 1)
269 8 10 if ($props and $props->{'$metadata'})
275 12 33 if (ref $props eq "HASH" and keys %$props == 1)
276 3 9 if (my $envvar = $props->{'$envvar'})
277 0 3 if (exists $ENV{$envvar}) { }
3 0 elsif (exists $ENV{uc $envvar}) { }
290 9 36 if (ref $props eq "HASH" and keys %$props == 1)
291 1 8 if ($props->{'$function'})
293 1 0 if ($name and $next)
294 1 0 if (my $resolved = $self->reify($name))
295 1 0 if (&Scalar::Util::blessed($resolved) or not ref $resolved and $resolved =~ /^[a-z-A-Z]/u)
298 1 0 if $next and $next =~ /^[a-zA-Z]/u
306 8 37 if (ref $props eq "HASH" and keys %$props == 1)
307 1 7 if ($props->{'$method'})
309 1 0 if ($name and $next)
310 1 0 if (my $resolved = $self->reify($name))
311 1 0 if (&Scalar::Util::blessed($resolved) or not ref $resolved and $resolved =~ /^[a-z-A-Z]/u)
313 1 0 if $next and $next =~ /^[a-zA-Z]/u
321 7 38 if (ref $props eq "HASH" and keys %$props == 1)
322 1 6 if ($props->{'$routine'})
324 1 0 if ($name and $next)
325 1 0 if (my $resolved = $self->reify($name))
326 1 0 if (&Scalar::Util::blessed($resolved) or not ref $resolved and $resolved =~ /^[a-z-A-Z]/u)
330 1 0 if $next and $next =~ /^[a-zA-Z]/u
339 6 39 if (ref $props eq "HASH" and keys %$props == 1)
340 1 5 if (my $callback = $props->{'$callback'})
346 5 40 if (ref $props eq "HASH" and keys %$props == 1)
347 0 5 if ($props->{'$service'})
352 0 45 if (ref $props eq "HASH" and grep ref($_), values %$props)
370 1 114 $name ? :