Branch Coverage

blib/lib/Cake.pm
Criterion Covered Total %
branch 33 142 23.2


line true false branch
68 4 0 if (/^Plugin$/) { }
0 0 elsif (/^Controller$/) { }
77 0 0 if (/^:Engine=(\S+)/ and not $ENGINE) { }
0 0 elsif (/^:Debug=(\S+)/) { }
80 0 0 if ($@)
87 8 3 unless ($SELF)
105 0 0 if ($@)
116 1 3 if (@_ > 1 or ref $_[0] eq 'HASH') { }
117 0 1 if (not ref $_[0]) { }
119 0 0 @_ > 1 ? :
123 0 1 if (my $plugins = delete $$SETTINGS{'plugins'})
124 0 0 if (ref $plugins eq 'ARRAY')
131 3 0 $$SETTINGS{$package} ? :
138 0 0 if ($_[0])
150 0 2 unless @plugins
153 4 0 unless (ref $plugins[$i])
156 4 0 if (ref(my $next = $plugins[$i + 1]))
192 3 0 unless $_[1]
198 0 3 if $COUNTER
211 0 3 if ($self->app->{'can'}{'begin'})
216 0 3 if $$self{'_count'} > '20'
218 0 3 if ($self->app->{'can'}{'end'})
225 0 3 if ($@)
238 0 2 unless $$self{'pid'}
239 0 2 if $$ != $$self{'pid'}
240 0 2 if (exists $$self{'on_destroy'})
241 0 0 if ref $_ eq 'CODE'
253 0 3 if $COUNTER
257 0 3 unless -d $dir
260 3 3 if ($_ =~ /\.pm$/)
265 0 3 if ($@)
274 0 3 $self->app->can('begin') ? :
0 3 $self->app->can('end') ? :
0 3 $self->app->can('error') ? :
0 3 $self->app->can('notfound') ? :
358 0 0 if (@_ == 1) { }
0 0 elsif (@_) { }
379 0 0 if (ref $args eq 'ARRAY')
386 0 0 if (my $chain = $$dispatch{'chains'}{$path})
391 0 0 if (ref $path eq 'Regexp') { }
422 0 0 unless ($chain_path =~ m[^/])
426 0 0 unless ($abs_path)
442 0 0 if (@_ > 1)
468 4 0 if (@_ == 2)
470 0 4 if (ref $content eq 'CODE') { }
488 1 0 if (ref $body eq 'GLOB') { }
501 0 0 if ($fh and ref $fh eq 'GLOB') { }
520 0 0 if (ref $data eq 'HASH')
538 0 0 if (@_ == 0)
542 0 0 if (ref $_[0] eq 'HASH') { }
0 0 elsif (@_ == 1) { }
0 0 elsif (@_ > 1) { }
550 0 0 unless (exists $self->parameters->{$param})
551 0 0 wantarray ? :
554 0 0 if (ref $self->parameters->{$param} eq 'ARRAY') { }
556 0 0 wantarray ? :
561 0 0 wantarray ? :
567 0 0 @_ >= 2 ? :
588 0 0 if (ref $header eq 'HASH') { }
0 0 elsif (ref $header eq 'ARRAY') { }
599 0 0 if (@_ > 1)
603 0 0 if ref $header or not $header =~ /(.*?):(.*?)/
606 0 0 if ($header =~ s/^content-type:\s*//i) { }
0 0 elsif ($header =~ s/^status:\s*//i) { }
622 0 0 if (@_)
628 0 0 wantarray ? :
636 0 0 if ($type)
647 3 0 if ($code)
681 0 0 if (ref $forward_to eq 'CODE') { }
0 0 elsif (not $forward_to =~ m[^/]) { }
702 0 0 if ($key =~ /$sub/i)