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) { }
353 2 0 UNIVERSAL::isa($_[0], 'CGI::Ex') ? :
355 0 2 ref $_[0] ? :
357 0 4 if /^-/
363 0 2 if $args->{'-expires'}
368 1 1 if ($self->content_typed) { }
371 0 1 if (my $r = $self->apache_request) { }
372 0 0 if ($self->is_mod_perl_1) { }
398 0 0 if ($self->content_typed) { }
0 0 elsif (my $r = $self->apache_request) { }
401 0 0 if ($self->is_mod_perl_1) { }
413 0 0 ref $_[0] ? :
423 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) { }
440 0 1 if $#stat == -1
451 0 0 unless (defined $mesg)
454 0 0 if ($self->content_typed)
457 0 0 if (my $r = $self->apache_request) { }
459 0 0 if ($self->is_mod_perl_1) { }
480 0 0 if ($self->content_typed)
483 0 0 if (my $r = $self->apache_request) { }
484 0 0 if ($self->is_mod_perl_1) { }
501 0 0 unless ref $self
504 0 0 if $js_file and not $js_file =~ /\.js$/i
509 0 0 if ($js_file and $js_file =~ m[^/*(\w+(?:/+\w+)*\.js)$]i)
512 0 0 unless -f $_file
520 0 0 unless ($stat)
521 0 0 if (not $self->content_typed) { }
530 0 0 unless ($self->content_typed)
536 0 0 if $ENV{'REQUEST_METHOD'} and $ENV{'REQUEST_METHOD'} eq "HEAD"
540 0 0 unless open FH, "<$js_file"
554 0 10 if (ref $args) { }
555 0 0 unless (UNIVERSAL::isa($args, "HASH"))
567 0 10 if ($module eq 'HTML::FillInForm') { }
569 0 0 if ($@)
572 0 0 if $args->{'text'}
573 0 0 if $args->{'form'}
575 0 0 if ($args->{'text'})
587 1 9 if ($args->{'text'}) { }
8 1 elsif ($args->{'scalarref'}) { }
1 0 elsif ($args->{'arrayref'}) { }
0 0 elsif ($args->{'file'}) { }
596 0 0 unless open IN, $args->{'file'}
598 0 0 unless read IN, $str, -s _
615 9 1 !$args->{'text'} ? :
624 2 0 @_ == 2 ? :
629 0 2 if $self->{'raise_error'}
655 0 2 if not $form and ref $self
656 0 2 if UNIVERSAL::isa($form, "CGI::Ex")
658 1 1 ref $str ? :
670 1 1 if (not $return) { }