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) { }
354 2 0 UNIVERSAL::isa($_[0], 'CGI::Ex') ? :
356 0 2 ref $_[0] ? :
358 0 4 if /^-/
364 0 2 if $args->{'-expires'}
369 1 1 if ($self->content_typed) { }
372 0 1 if (my $r = $self->apache_request) { }
373 0 0 if ($self->is_mod_perl_1) { }
399 0 0 if ($self->content_typed) { }
0 0 elsif (my $r = $self->apache_request) { }
402 0 0 if ($self->is_mod_perl_1) { }
414 0 0 ref $_[0] ? :
424 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) { }
441 0 1 if $#stat == -1
452 0 0 unless (defined $mesg)
455 0 0 if ($self->content_typed)
458 0 0 if (my $r = $self->apache_request) { }
460 0 0 if ($self->is_mod_perl_1) { }
481 0 0 if ($self->content_typed)
484 0 0 if (my $r = $self->apache_request) { }
485 0 0 if ($self->is_mod_perl_1) { }
502 0 0 unless ref $self
505 0 0 if $js_file and not $js_file =~ /\.js$/i
510 0 0 if ($js_file and $js_file =~ m[^/*(\w+(?:/+\w+)*\.js)$]i)
513 0 0 unless -f $_file
521 0 0 unless ($stat)
522 0 0 if (not $self->content_typed) { }
531 0 0 unless ($self->content_typed)
537 0 0 if $ENV{'REQUEST_METHOD'} and $ENV{'REQUEST_METHOD'} eq "HEAD"
541 0 0 unless open FH, "<$js_file"
555 0 10 if (ref $args) { }
556 0 0 unless (UNIVERSAL::isa($args, "HASH"))
568 0 10 if ($module eq 'HTML::FillInForm') { }
570 0 0 if ($@)
573 0 0 if $args->{'text'}
574 0 0 if $args->{'form'}
576 0 0 if ($args->{'text'})
588 1 9 if ($args->{'text'}) { }
8 1 elsif ($args->{'scalarref'}) { }
1 0 elsif ($args->{'arrayref'}) { }
0 0 elsif ($args->{'file'}) { }
597 0 0 unless open IN, $args->{'file'}
599 0 0 unless read IN, $str, -s _
616 9 1 !$args->{'text'} ? :
625 2 0 @_ == 2 ? :
630 0 2 if $self->{'raise_error'}
656 0 2 if not $form and ref $self
657 0 2 if UNIVERSAL::isa($form, "CGI::Ex")
659 1 1 ref $str ? :
671 1 1 if (not $return) { }