Branch Coverage

blib/lib/CGI/Cache.pm
Criterion Covered Total %
branch 44 78 56.4


line true false branch
88 0 0 if ($OLD_WARN_SIG) { }
106 0 0 if ($OLD_DIE_SIG) { }
124 10 0 unless $CAPTURE_STARTED
128 0 0 if ($CALLED_WARN_OR_DIE or $CGI::Cache::WROTE_TO_STDERR or $? == 2) { }
146 1 19 unless defined $options
148 0 20 unless UNIVERSAL::isa($options, 'HASH') and not @_
154 0 20 unless defined $CGI::Cache::THE_CACHE
177 16 4 unless defined $options->{'watched_output_handle'}
180 17 3 unless defined $options->{'watched_error_handle'}
183 15 5 unless defined $options->{'output_handle'}
186 17 3 unless defined $options->{'error_handle'}
189 19 1 unless defined $options->{'enable_output'}
201 19 1 unless (defined $cache_options->{'namespace'})
204 18 1 if (defined $ENV{'SCRIPT_NAME'}) { }
218 19 1 unless defined $cache_options->{'default_expires_in'}
222 1 19 unless defined $cache_options->{'cache_root'}
226 18 2 unless defined $cache_options->{'max_size'}
235 0 1 unless my $tmpdir = tmpdir()
261 0 1 unless defined $CGI::Cache::THE_CACHE_KEY
267 0 1 if (defined $cached_output) { }
286 0 1 unless $CAPTURE_STARTED
289 1 0 unless defined $cache_output
294 1 0 if $cache_output
312 0 0 unless $CAPTURE_STARTED and $CAPTURING
325 0 0 unless $CAPTURE_STARTED and not $CAPTURING
338 1 1 unless @handles
340 2 0 if (grep /output/, @handles)
350 1 1 if (grep /error/, @handles)
359 0 0 if (exists $SIG{'__WARN__'} and defined $SIG{'__WARN__'} and $SIG{'__WARN__'} ne \&CGI::Cache::warn)
361 0 0 if $SIG{'__WARN__'} ne ''
365 0 0 if (exists $SIG{'__DIE__'} and defined $SIG{'__DIE__'} and $SIG{'__DIE__'} ne \&CGI::Cache::die)
367 0 0 if $SIG{'__DIE__'} ne ''
379 1 1 unless @handles
381 2 0 if (grep /output/, @handles)
390 1 1 if (grep /error/, @handles)
396 0 1 if defined $OLD_DIE_SIG
398 0 1 if defined $OLD_WARN_SIG
425 0 0 if @_
466 1 0 if ($CGI::Cache::ENABLE_OUTPUT)