Branch Coverage

blib/lib/CGI/Snapp.pm
Criterion Covered Total %
branch 64 176 36.3


line true false branch
148 0 7 unless defined $hook
154 0 7 unless $class_callbacks{$hook}
156 2 5 if (ref $self) { }
161 2 0 unless $object_callback->{$hook}
186 0 0 if (@headers)
189 0 0 scalar(@headers) % 2 == 0 ? :
0 0 ref $headers[0] eq 'ARRAY' ? :
0 0 ref $headers[0] eq 'HASH' ? :
199 0 0 if (ref $new{$key} eq 'ARRAY') { }
201 0 0 if (ref $value eq 'ARRAY') { }
207 0 0 if defined $value
212 0 0 if (ref $value eq 'ARRAY') { }
218 0 0 if defined $value
239 4 3 if $args->{'PARAMS'} and ref $args->{'PARAMS'} eq 'HASH'
240 0 7 if $args->{'QUERY'}
241 0 7 if $ENV{'CGI_SNAPP_RETURN_ONLY'}
254 0 29 unless defined $hook
268 0 1 if $seen{$callback}
276 0 0 if $@
288 54 33 unless exists $class_callbacks{$hook}{$class}
292 15 28 if $seen{$callback}
300 0 0 if $@
321 0 0 unless ($self->_query)
372 0 0 if (defined $key)
414 4 0 $type eq 'redirect' ? :
3 4 $type eq 'header' ? :
437 0 7 if ref $output eq 'SCALAR'
457 0 0 $type eq 'redirect' ? :
0 0 $type eq 'header' ? :
474 0 7 if (ref $mode_source eq 'CODE') { }
0 7 elsif (ref $mode_source eq 'HASH') { }
484 0 7 unless $self->query
489 0 7 unless defined $run_mode
551 0 0 if $method_name
562 1 0 defined $run_mode ? :
586 8 0 if (exists $run_modes{$run_mode}) { }
592 0 0 unless exists $run_modes{'AUTOLOAD'}
602 0 8 $is_autoload ? :
610 0 0 if ($method_name = $self->error_mode) { }
627 7 1 defined $output ? :
641 0 0 unless $type =~ /^(?:class|object)$/
642 0 0 if length $hook == 0
644 0 0 $type eq 'class' ? :
669 4 0 scalar(@headers) % 2 == 0 ? :
0 4 ref $headers[0] eq 'ARRAY' ? :
0 4 ref $headers[0] eq 'HASH' ? :
675 4 0 if (scalar keys %new)
683 0 0 unless defined $value
685 0 0 if ref $value ne 'ARRAY'
706 0 7 if (@headers)
709 0 0 scalar(@headers) % 2 == 0 ? :
0 0 ref $headers[0] eq 'ARRAY' ? :
0 0 ref $headers[0] eq 'HASH' ? :
729 4 7 if ($option)
733 0 4 unless $valid{$option}
754 201 0 if $myself and $myself->logger
768 7 0 if (@new_options) { }
772 7 0 if ($#new_options == 0 and not $ref =~ /(?:ARRAY|HASH)/) { }
779 0 0 scalar(@new_options) % 2 == 0 ? :
0 0 $ref eq 'ARRAY' ? :
0 0 $ref eq 'HASH' ? :
785 0 0 defined $new_options{'param'} ? :
789 0 0 if ($index and $path_info)
791 0 0 if $index > 0
794 0 0 length $index ? :
815 0 0 unless defined $hook
840 18 0 if (@params) { }
844 0 18 if (ref $params[0] eq 'HASH') { }
0 18 elsif (ref $params[0] eq 'ARRAY') { }
0 18 elsif (scalar @params % 2 == 0) { }
18 0 elsif ($#params == 0) { }
855 0 0 if $#params == 1
876 18 0 $returnz eq 'scalar' ? :
885 1 0 defined $run_mode ? :
889 0 1 if $self->_prerun_mode_lock
910 0 0 unless ($arg{'QUERY'})
934 7 21 if $q
935 0 28 unless $self->_query
953 1 3 if ($self->_prerun_mode_lock == 0)
959 1 3 if ($status) { }
982 0 7 if ($self->_psgi) { }
1000 0 7 if $self->send_output
1019 8 8 if (@new_modes)
1022 1 0 scalar(@new_modes) % 2 == 0 ? :
0 1 ref $new_modes[0] eq 'ARRAY' ? :
7 1 ref $new_modes[0] eq 'HASH' ? :
1049 7 0 if ($run_mode) { }
1051 7 0 defined $run_mode ? :