Branch Coverage

blib/lib/CGI/Ex.pm
Criterion Covered Total %
branch 76 190 40.0


line true false branch
52 0 0 $ENV{'MOD_PERL'} =~ m[ ^ mod_perl / (\d+\.[\d_]+) (?: \.\d+)? $ ]x ? :
6 0 !$ENV{'MOD_PERL'} ? :
55 6 0 if $v < "1.98"
60 0 6 if (&_is_mod_perl_1()) { }
0 6 elsif (&_is_mod_perl_2()) { }
64 0 0 if (eval { do { require Apache2::RequestRec } }) { }
82 6 10 ref $_[0] ? :
93 0 6 if $#_ != -1
95 3 3 unless (defined $self->{'object'})
101 0 3 if $@
113 0 0 $AUTOLOAD =~ /(\w+)$/ ? :
129 0 6 unless ($self->isa("CGI::Ex"))
134 2 4 if $self->{'form'}
141 4 0 $obj->can('multi_param') ? :
143 5 0 $mp ? :
144 4 1 $#val <= 0 ? :
161 1 2 if @_ == 1
171 1 1 ref $_[0] ? :
178 1 2 ref $val eq 'ARRAY' ? :
199 0 3 unless ($self->isa("CGI::Ex"))
204 1 2 if $self->{'cookies'}
210 2 0 $#val == 0 ? :
0 2 $#val == -1 ? :
227 1 2 if @_ == 1
238 0 13 if $#_ != -1
264 5 5 @_ && ref $_[0] ? :
265 5 5 unless $self
267 8 2 if ($type) { }
268 0 8 unless $type =~ m[^[\w\-\.]+/[\w\-\.\+]+$]
272 2 8 if $charset and $charset =~ /^[\w\-\.\:\+]+$/
274 0 10 if (my $r = $self->apache_request) { }
275 0 0 if $r->bytes_sent
277 0 0 if $self->is_mod_perl_1
279 10 0 unless ($ENV{'CONTENT_TYPED'})
293 0 2 if (my $r = $self->apache_request) { }
296 1 1 $ENV{'CONTENT_TYPED'} ? :
307 0 0 $#_ == 1 ? :
308 0 0 unless $self
309 0 0 if $loc
311 0 0 if ($html_loc)
318 0 0 if ($self->content_typed) { }
0 0 elsif (my $r = $self->apache_request) { }
319 0 0 if ($DEBUG_LOCATION_BOUNCE) { }
327 0 0 if ($self->is_mod_perl_1) { }
352 2 0 UNIVERSAL::isa($_[0], 'CGI::Ex') ? :
354 0 2 ref $_[0] ? :
356 0 4 if /^-/
362 0 2 if $args->{'-expires'}
367 1 1 if ($self->content_typed) { }
370 0 1 if (my $r = $self->apache_request) { }
371 0 0 if ($self->is_mod_perl_1) { }
397 0 0 if ($self->content_typed) { }
0 0 elsif (my $r = $self->apache_request) { }
400 0 0 if ($self->is_mod_perl_1) { }
412 0 0 ref $_[0] ? :
422 1 6 if (not $time or lc $time eq 'now') { }
1 5 elsif ($time =~ /^\d+$/) { }
4 1 elsif ($time =~ /^([+-]?)\s*(\d+|\d*\.\d+)\s*([a-z])[a-z]*$/i) { }
439 0 1 if $#stat == -1
450 0 0 unless (defined $mesg)
453 0 0 if ($self->content_typed)
456 0 0 if (my $r = $self->apache_request) { }
458 0 0 if ($self->is_mod_perl_1) { }
479 0 0 if ($self->content_typed)
482 0 0 if (my $r = $self->apache_request) { }
483 0 0 if ($self->is_mod_perl_1) { }
500 0 0 unless ref $self
503 0 0 if $js_file and not $js_file =~ /\.js$/i
508 0 0 if ($js_file and $js_file =~ m[^/*(\w+(?:/+\w+)*\.js)$]i)
511 0 0 unless -f $_file
519 0 0 unless ($stat)
520 0 0 if (not $self->content_typed) { }
529 0 0 unless ($self->content_typed)
535 0 0 if $ENV{'REQUEST_METHOD'} and $ENV{'REQUEST_METHOD'} eq "HEAD"
539 0 0 unless open FH, "<$js_file"
553 0 10 if (ref $args) { }
554 0 0 unless (UNIVERSAL::isa($args, "HASH"))
566 0 10 if ($module eq 'HTML::FillInForm') { }
568 0 0 if ($@)
571 0 0 if $args->{'text'}
572 0 0 if $args->{'form'}
574 0 0 if ($args->{'text'})
586 1 9 if ($args->{'text'}) { }
8 1 elsif ($args->{'scalarref'}) { }
1 0 elsif ($args->{'arrayref'}) { }
0 0 elsif ($args->{'file'}) { }
595 0 0 unless open IN, $args->{'file'}
597 0 0 unless read IN, $str, -s _
614 9 1 !$args->{'text'} ? :
623 2 0 @_ == 2 ? :
628 0 2 if $self->{'raise_error'}
654 0 2 if not $form and ref $self
655 0 2 if UNIVERSAL::isa($form, "CGI::Ex")
657 1 1 ref $str ? :
669 1 1 if (not $return) { }