Branch Coverage

blib/lib/CGI/Application/Plugin/AutoRunmode.pm
Criterion Covered Total %
branch 62 68 91.1


line true false branch
22 9 0 if ($has_ah)
23 24 2 if $_[0]->can($name) eq $ref
10 0 if ($name ne 'ANON')
10 10 if ($CGI::Application::VERSION >= 4 and $phase eq 'CHECK')
10 18 if (uc $_ eq 'RUNMODE')
9 9 if (uc $_ eq 'STARTRUNMODE')
7 2 if (uc $_ eq 'ERRORRUNMODE')
79 0 9 if $@
84 0 9 unless ($has_ah)
85 0 0 unless eval qq[sub MODIFY_CODE_ATTRIBUTES{\n\tmy (\$pkg, \$ref, \@attr) = \@_;\n\t\n\tmy \@unknown;\n\tforeach (\@attr){\n\t\tmy \$u = uc \$_;\n\t\t\$CGI::Application::Plugin::AutoRunmode::RUNMODES{"\$ref"} = 1, next\n\t\t\tif \$u eq 'RUNMODE';\n\t\tif (\$u eq 'STARTRUNMODE'){\n\t\t\tinstall_start_mode(\$pkg, \$ref);\n\t\t\tnext;\n\t\t}\n\t\tif (\$u eq 'ERRORRUNMODE'){\n\t\t\tinstall_error_mode(\$pkg, \$ref);\n\t\t\tnext;\n\t\t}\n\t\tpush \@unknown, \$_;\n\t}\n\treturn \@unknown;\n}\n1;\n]
121 9 11 if (@_ < 2 and $CGI::Application::VERSION >= 4)
123 3 6 if (UNIVERSAL::isa($caller, 'CGI::Application'))
153 1 41 if (length $prerun_mode)
156 1 41 unless defined $rm
158 28 13 unless (exists $rmodes{$rm})
160 24 4 if ($rm =~ /^(\w+)$/)
163 8 16 if is_attribute_auto_runmode($self, $rm)
168 11 5 if $sub
180 2 7 if (defined *{"${pkg}::start_mode";})
181 1 1 if ($ENV{'MOD_PERL'} and exists $INC{'Apache2/Reload.pm'}) { }
199 13 7 if @_ > 1
200 4 3 if $memory
212 2 5 if (defined *{"${pkg}::error_mode";})
213 1 1 if ($ENV{'MOD_PERL'} and exists $INC{'Apache2/Reload.pm'}) { }
229 1 3 if @_ > 1
230 1 2 if $memory
248 10 49 if (defined $val and defined *ENTRY{'CODE'})
249 5 5 unless *ENTRY{'CODE'} eq $ref
262 19 23 unless $sub
263 14 9 if $RUNMODES{"$sub"}
279 10 18 unless $delegate
280 1 17 if exists $__illegal_names{$rm}
283 2 15 ref $delegate eq 'ARRAY' ? :
288 5 13 unless $sub