Condition Coverage

blib/lib/Apache2/SSI.pm
Criterion Covered Total %
condition 101 410 24.6


and 2 conditions

line l !l condition
1871 1 0 $r and 0

and 3 conditions

line !l l&&!r l&&r condition
21 14 0 0 exists $ENV{'MOD_PERL'} and $MOD_PERL = $ENV{'MOD_PERL'} =~ m[^mod_perl/(\d+\.[\d\.]+)]
200 0 0 0 &Scalar::Util::blessed($_[1]) and $_[1]->isa('Apache2::Filter')
260 139 0 10 $type eq 'string' and $opts->{'skip'} ne 'string'
340 0 1 0 -e "$file" and -f "$file" && -r "$file" || -d "$file" && -x "$file"
629 0 21 13 not length $try and length $env->{$var_name}
633 13 21 0 not length $try and defined ${"main::$var_name";}
841 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
854 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
869 0 0 0 $r->is_initial_req and $main->content_type eq 'text/html'
895 0 0 0 $max_length and length $html >= $max_length
933 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
994 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1009 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1063 62 0 0 $MOD_PERL and not $r
1115 0 0 62 length "$p->{'document_uri'}" and length "$p->{'document_root'}"
1181 0 0 1 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1194 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1207 0 0 1 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1227 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1279 0 0 2 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1292 0 0 1 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1308 0 0 1 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1321 0 0 2 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1342 0 0 1 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1372 0 0 0 defined $_[-1] and &Scalar::Util::reftype($_[-1]) eq 'HASH'
1445 0 0 0 defined $newfile and length $newfile
1511 0 0 3 defined $uri and length $uri
1577 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1645 0 38 0 defined $var and $r
38 0 0 defined $var and $r and defined($value = $r->subprocess_env($var))
0 30 8 defined $var and $self->can(my $method = "parse_echo_\L$var\E")
0 30 0 defined $var and exists $env->{$var}
1664 38 0 0 $args->{'decoding'} and lc $args->{'decoding'} ne 'none'
1690 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1693 38 0 0 $args->{'encoding'} and lc $args->{'encoding'} ne 'none'
1719 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1927 0 0 0 $^O =~ /^(dos|mswin32|NetWare|symbian|win32)$/i and -T "$finfo"
1945 0 0 0 not length $cgi->path_info and length $uri->path_info
1946 0 0 0 not length $cgi->query_string and length $uri->query_string
1970 1 0 0 $^O =~ /^(dos|mswin32|NetWare|symbian|win32)$/i and $mime eq 'text/x-perl'
1998 0 0 0 $line =~ /^\s+(.*)/ and $key
2056 0 71 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2143 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2394 0 0 0 $r and lc $r->dir_config('SSIPerlPass_Request') eq 'no'
2418 8 0 0 $args->{'decoding'} and lc $args->{'decoding'} ne 'none'
2444 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2449 8 0 0 $args->{'encoding'} and lc $args->{'encoding'} ne 'none'
2475 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2499 113 44 1 $self->{'suspend'}[0] and not $tag =~ /^(if|elif|else|endif)/
2561 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2580 0 0 0 not length $self->{'server_version'} and length $SERVER_VERSION
2598 0 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2603 0 0 0 not $vers and my $apxs = File::Which::which('apxs')
2694 0 0 3 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2745 0 0 3 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2822 0 0 0 $zone && $zone =~ /GMT/
2868 0 0 0 $buffer and length $bdata
2955 0 0 0 @_ == 3 and ref $headers eq 'CODE'
2973 0 0 0 $subr->status == 'Apache2::Const::HTTP_OK' and length $subr->handler || $subr->finfo->filetype == 'APR::Const::FILETYPE_REG'
2996 0 0 0 $_ = $I->headers_in->{'Host'} and $subr->headers_in->add('Host', $_)

or 2 conditions

line l !l condition
572 3 0 $res //= ''
807 0 0 int $r->dir_config('Apache2_SSI_Max_Length') || 0
887 0 0 int $r->dir_config('Apache2_SSI_Max_Length') || 0
1030 62 0 delete $args->{'document_uri'} // ''
1117 62 0 'Apache2::SSI::URI'->new($p) || (return $self->error(qq[Unable to instantiate an Apache2::SSI::URI object with document uri "$p->{'document_uri'}" and document root "$p->{'document_root'}": ], 'Apache2::SSI::URI'->error))
1155 4 0 $class->new(%$params) || (return $self->error('Unable to create a clone of our object: ', $class->error))
1467 3 0 shift @_ || (return $self->error('No file provided to look up.'))
1470 3 0 'Apache2::SSI::File'->new($file, $r ? ('apache_request', $r) : (), 'base_file', $self->uri->filename, 'debug', $self->debug) || (return $self->error('Unable to instantiate an Apache2::SSI::File object: ', 'Apache2::SSI::File'->error))
1489 6 0 'Apache2::SSI::URI'->new($r ? ('apache_request', $r) : (), 'base_uri', $self->uri, 'document_uri', $uri, 'document_root', $r ? $r->document_root : $self->document_root, 'debug', $self->debug) || (return $self->error('Unable to instantiate an Apache2::SSI::URI object: ', 'Apache2::SSI::URI'->error))
1520 3 0 'Apache2::SSI::URI'->new($p) || (return $self->error('Unable to create an Apache2::SSI::URI: ', 'Apache2::SSI::URI'->error))
1839 50 3 $result //= ''
2501 157 0 $self->can($method) || (return $self->error(qq[ssi function $tag is unsupported. No method $method found in package "], ref $self, '".'))
2654 21 0 $this->{'type'} // ''
3 18 $this->{'subtype'} // ''
2669 0 3 $tzone || 'local'
2678 3 0 $params->{'time_zone'} || 'local'
2732 3 0 shift @_ || (return $self->error('No subnet provided'))
2772 0 0 'IO::File'->new("<$file") || (return $self->error(qq[Unable to open file "$file" in read mode: $!]))

or 3 conditions

line l !l&&r !l&&!r condition
272 0 0 2 $op eq 'strmatch' or $op eq 'fnmatch'
328 2 0 10 $op eq 'A' or $op eq 'U'
0 0 10 $op eq 'd' or $op eq 'e'
0 0 10 $op eq 'd' or $op eq 'e' or $op eq 'f'
0 0 10 $op eq 'd' or $op eq 'e' or $op eq 'f' or $op eq 's'
0 0 10 $op eq 'h' or $op eq 'L'
2 3 5 $op eq 'n' or $op eq 'z'
340 1 0 0 -f "$file" && -r "$file" || -d "$file" && -x "$file"
408 1 0 2 $val eq '' or $val eq '0'
1 1 1 $val eq '' or $val eq '0' or $val eq 'off'
1 0 1 $val eq '' or $val eq '0' or $val eq 'off' or $val eq 'false'
1 0 1 $val eq '' or $val eq '0' or $val eq 'off' or $val eq 'false' or $val eq 'no'
648 2 1 11 $self->_is_number($try) or $opts->{'embedded'}
724 0 3 0 $that->{'type'} eq 'string' or $that->{'type'} eq 'word'
3 0 0 $that->{'type'} eq 'string' or $that->{'type'} eq 'word' or $that->{'type'} eq 'variable'
789 0 0 0 $class->new($params) || do {
795 0 0 0 $self->uri || do {
841 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
854 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
933 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
970 0 0 0 $class->new($params) || do {
994 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1009 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1146 4 0 0 ref $self || $self
1181 1 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1194 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1207 1 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1227 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1250 84 0 0 $self->{'document_root'} || $self->env('DOCUMENT_ROOT')
1279 2 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1292 1 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1308 1 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1321 2 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1342 1 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1375 0 0 0 $opts->{'apache_request'} || $self->apache_request
1570 0 0 0 $val //= $notes->get($var)
1577 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1690 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1719 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1736 0 0 0 $r->subprocess_env('DOCUMENT_NAME') || $uri->finfo->name
1744 0 2 0 $env->{'DOCUMENT_NAME'} || $uri->finfo->name
1759 0 0 0 $r->subprocess_env('LAST_MODIFIED') || $self->_lastmod($r->filename)
1765 0 1 0 $env->{'LAST_MODIFIED'} || $self->_format_time($uri->finfo->mtime)
1898 3 0 0 $self->new_uri($args->{'cgi'}) || do {
1904 3 0 0 $self->document_root || do {
2056 0 0 71 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2076 0 1 0 $args->{'timefmt'} || $self->{'timefmt'}
2137 0 0 0 $r->subprocess_env($var) || $env->{$var} || $self->notes($var)
2143 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2147 1 0 0 $env->{$var} || $self->notes($var)
2284 1 3 0 exists $args->{'file'} or exists $args->{'virtual'}
2312 4 0 0 $self->clone || do {
2444 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2475 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2552 0 0 0 $c->can('client_ip') // $c->can('remote_ip')
2561 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2598 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2665 1 2 0 $format ||= $self->{'timefmt'}
2694 0 3 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2733 3 0 0 shift @_ || $self->remote_ip
2745 3 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2883 0 0 0 $r->status == 'Apache2::Const::HTTP_OK' or $r->pnotes->{'force_fetch_content'}
2973 0 0 0 length $subr->handler || $subr->finfo->filetype == 'APR::Const::FILETYPE_REG'
2977 0 0 0 $outfn || $output