Branch Coverage

blib/lib/CGI/Bus.pm
Criterion Covered Total %
branch 0 616 0.0


line true false branch
42 0 0 if (not ref $s) { }
0 0 elsif (scalar @_) { }
45 0 0 unless $$s{-'cgi'}
47 0 0 if $$s{-'fcgicount'} > ($$s{-'fcgimax'} || 0)
55 0 0 if (ref $_[0] and eval { do { $_[0]->isa('CGI::Bus') } }) { }
65 0 0 unless defined $_[0]
133 0 0 if ($ENV{'MOD_PERL'})
137 0 0 unless ($$s{-'cgi'})
138 0 0 if $$s{-'fcgimax'}
142 0 0 if ($ENV{'CONTENT_TYPE'} || '') =~ m[^multipart/form-data] and not $ENV{'MOD_PERL'}
151 0 0 if (($ENV{'SERVER_SOFTWARE'} || '') =~ /IIS/ or $ENV{'MOD_PERL'} and not $ENV{'PERL_SEND_HEADER'})
173 0 0 if scalar @_ == 1
174 0 0 if scalar @_ == 2
180 0 0 if ($h = $opt{-'import'})
184 0 0 if (ref $l eq 'HASH') { }
0 0 elsif (ref $l eq 'ARRAY') { }
185 0 0 $k =~ /^([^\;\s\(]+)/ ? :
194 0 0 $k =~ /^([^\;\s\(]+)/ ? :
206 0 0 if ($h = $opt{-'reimport'})
208 0 0 if (ref $h eq 'HASH') { }
0 0 elsif (ref $h eq 'ARRAY') { }
221 0 0 if ($opt{-'debug'})
222 0 0 if $^S
223 0 0 $_[0] =~ /(.+)[\n\r]+$/ ? :
225 0 0 if $opt{-'tpath'} and -d $opt{-'tpath'} || $s->fut->mkdir($opt{-'tpath'})
238 0 0 ref $_[0] eq 'ARRAY' ? :
0 0 !scalar(@_) ? :
247 0 0 if not $t or $t eq 'HASH' or $t eq 'ARRAY'
250 0 0 if ref $o and $o->isa('HASH')
253 0 0 if (not scalar @_ and $ENV{'MOD_PERL'})
270 0 0 ref $c ? :
275 0 0 unless ref $s
278 0 0 if (ref $$s{$k} eq 'CODE') { }
0 0 elsif (not scalar @_ and ref $$s{$k}) { }
0 0 elsif ($$s{-'classes'}{$k}) { }
283 0 0 ref $c ? :
284 0 0 if $@
285 0 0 if $o->isa('HASH')
294 0 0 wantarray ? :
295 0 0 if ($@)
296 0 0 if (grep {$m eq $_;} 'select', 'tr', 'link', 'delete', 'accept', 'sub', 'vars')
298 0 0 wantarray ? :
300 0 0 if $@
302 0 0 wantarray ? :
309 0 0 unless defined $m
314 0 0 if ($$s{-'classes'}{$k}) { }
316 0 0 ref $c ? :
321 0 0 if $@
322 0 0 unless defined $o
323 0 0 if $o->isa('HASH')
334 0 0 if (defined $o) { }
336 0 0 if $o->isa('HASH')
347 0 0 $$s{-'debug'} ? :
349 0 0 if (($$s{-'debug'} || 0) > 4)
366 0 0 if $^X
382 0 0 if (not defined $v) { }
0 0 elsif (UNIVERSAL::isa($v, 'ARRAY')) { }
0 0 elsif (UNIVERSAL::isa($v, 'HASH') and not UNIVERSAL::isa($v, 'CGI::Bus')) { }
386 0 0 if scalar @$v
392 0 0 if scalar %$v
407 0 0 if (not $_[0]{-'lngname'} or $_[1])
408 0 0 if (defined $_[1]) { }
414 0 0 $_[0]{-'lngname'} =~ /^([^ ;,]+)/ ? :
423 0 0 unless $c
424 0 0 unless $l
430 0 0 if $r
437 0 0 unless $_[0]{-'cache'}{-'lngbase'}
439 0 0 !(defined $$r{$_[2]} && defined $$r{$_[2]}[$_[1]]) ? :
0 0 !defined($_[2]) ? :
451 0 0 unless $$s{-'cache'}{-'pushmsg'}
452 0 0 if scalar @_
459 0 0 unless $$s{-'pushlog'}
461 0 0 defined $_ ? :
474 0 0 if (not $m =~ /\n/) { }
480 0 0 unless ($_[0] and $_[0]{-'cache'} and $_[0]{-'cache'}{-'httpheader'})
491 0 0 unless (CGI::Carp::ineval())
493 0 0 unless ($m =~ /\n/ and $_[0]{-'cgi'})
498 0 0 unless ($_[0] and $_[0]{-'cache'} and $_[0]{-'cache'}{-'httpheader'})
510 0 0 !($m =~ /\n/) ? :
523 0 0 $ENV{'MOD_PERL'} ? :
529 0 0 if (scalar @_ > 1) { }
0 0 elsif (not $_[0]{-'dbi'} and $_[0]{-'classes'}{-'dbi'}) { }
537 0 0 ref $v eq 'CODE' ? :
548 0 0 $_[0]{-'dbi'} || $_[0]{-'classes'}{-'dbi'} ? :
562 0 0 if ($#_ > 0)
565 0 0 if ($v) { }
0 0 elsif (not $ENV{'PERLXS'} || ($ENV{'GATEWAY_INTERFACE'} || '') =~ /PerlEx/) { }
0 0 elsif ($#_ > 2 or $#_ == 2 and not $_[2]) { }
0 0 elsif ($_[1] eq '-relative') { }
0 0 elsif ($_[1] eq '-absolute') { }
570 0 0 if $v =~ m[[\\/]([^\\/]+)$]
577 0 0 if $_[0]{-'cache'}{-'url'}
581 0 0 if ($ENV{'PERLXS'} or ($ENV{'GATEWAY_INTERFACE'} || '') =~ /PerlEx/)
582 0 0 $_[0]{-'cache'}{-'url'} =~ m[/$] || $ENV{'SCRIPT_NAME'} =~ m[^/] ? :
0 0 if not $_[0]{-'cache'}{-'url'} =~ m[\w/\w] and $ENV{'SCRIPT_NAME'}
599 0 0 unless defined $_[0]{-'qpath'}
600 0 0 !defined($_[1]) ? :
605 0 0 unless defined $_[0]{-'qurl'}
606 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
613 0 0 if (not ref $_[0]) { }
0 0 elsif (ref $_[0] eq 'ARRAY') { }
0 0 elsif (ref $_[0] eq 'HASH') { }
617 0 0 if (not defined $_[1]) { }
644 0 0 if ref $_[0] ne 'ARRAY' or defined $_[1]
652 0 0 if not $_[0]{-'cache'}{-'qrun'} or $_[1]
666 0 0 unless (defined $_[0]{-'spath'})
671 0 0 !defined($_[1]) ? :
676 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
685 0 0 unless (defined $_[0]{-'bpath'})
686 0 0 ($ENV{'SCRIPT_FILENAME'} || $ENV{'PATH_TRANSLATED'} || $0) =~ m[^(.+?)[\\/][^\\/]+$] ? :
688 0 0 !defined($_[1]) ? :
693 0 0 unless (defined $_[0]{-'burl'})
694 0 0 ($ENV{'SCRIPT_NAME'} || $ENV{'PATH_INFO'} || $0) =~ m[^[\\/]*(.+?)[\\/]+[^\\/]+$] ? :
695 0 0 $pv ? :
697 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
703 0 0 unless (defined $_[0]{-'dpath'})
706 0 0 !defined($_[1]) ? :
711 0 0 unless (defined $_[0]{-'tpath'})
720 0 0 !defined($_[1]) ? :
725 0 0 unless (defined $_[0]{-'ppath'})
728 0 0 !defined($_[1]) ? :
733 0 0 unless (defined $_[0]{-'purl'})
736 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
742 0 0 unless defined $_[0]{-'fpath'}
743 0 0 !defined($_[1]) ? :
748 0 0 unless defined $_[0]{-'furl'}
749 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
755 0 0 unless defined $_[0]{-'furf'}
756 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
762 0 0 unless defined $_[0]{-'hpath'}
763 0 0 !defined($_[1]) ? :
768 0 0 unless defined $_[0]{-'hurl'}
769 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
775 0 0 unless defined $_[0]{-'hurf'}
776 0 0 !defined($_[1]) || $_[1] eq '' ? :
0 0 scalar @_ > 1 ? :
784 0 0 exists $$s{-'urfcnd'} ? :
0 0 ref $$s{-'urfcnd'} eq 'CODE' ? :
0 0 if ($$s{-'cgi'}->user_agent || '') =~ /MSIE|StarOffice/
796 0 0 $h ? :
798 0 0 unless exists $$r{$k}
804 0 0 ($_[1] || 0) > ($_[2] || 0) ? :
0 0 unless ($_[1] || 0) > ($_[2] || 0) ? $_[1] : $_[2]
809 0 0 ($_[1] || 0) > ($_[2] || 0) ? :
0 0 unless ($_[1] || 0) > ($_[2] || 0) ? $_[2] : $_[1]
815 0 0 index($_[0], '-') == 0 ? :
0 0 ref $_[0] ? :
819 0 0 if &$s($_)
826 0 0 @_ == 0 || $_[0] =~ /^\d+$/i ? :
827 0 0 @_ == 1 ? :
0 0 @_ == 0 ? :
843 0 0 @_ < 2 || !$_[1] ? :
848 0 0 unless $ts =~ /(\d+)/
850 0 0 if $m eq 'yyyy' or $m eq '%Y'
852 0 0 if $m eq 'm' and $th{$m}
853 0 0 if $m ne 'M'
874 0 0 if ($v =~ /oem|866/i) { }
0 0 elsif ($v =~ /ansi|1251/i) { }
0 0 elsif ($v =~ /koi/i) { }
0 0 elsif ($v =~ /8859-5/i) { }
880 0 0 @s > 1 ? :
896 0 0 if defined $e
911 0 0 if (not $_[0]{-'cache'}{-'user'} or $_[1])
914 0 0 ref $_[0]{-'user'} eq 'CODE' ? :
0 0 $_[1] ? :
916 0 0 if ($_[0]{-'usercnv'})
926 0 0 unless $_[0]{-'cache'}{-'useron'}
934 0 0 if (scalar @_)
935 0 0 if $_[0] eq $u
936 0 0 $s->uadmin ? :
0 0 if ref $_[0]
941 0 0 if $n eq $_[0]
944 0 0 if (not defined $$s{-'uadmins'}) { }
0 0 elsif (ref $$s{-'uadmins'} eq 'CODE') { }
0 0 elsif (ref $$s{-'uadmins'} eq 'ARRAY') { }
946 0 0 if $u eq $$s{-'uadmins'}
948 0 0 unless defined $n
949 0 0 if grep {$_ eq $n;} @{$$s{-'uadmins'};}
963 0 0 scalar @_ > 1 ? :
964 0 0 if not defined $v or $v eq ''
965 0 0 $v =~ /\\([^\\]+)$/ ? :
0 0 $v =~ /^([^\@])\@/i ? :
0 0 $v =~ /CN=([^=,]+)/i ? :
973 0 0 scalar @_ > 1 ? :
974 0 0 if not defined $v or $v eq ''
976 0 0 if ($v =~ m[^(.*?)[/\@]\Q$d\E$]i) { }
0 0 elsif ($v =~ /^\Q$d\E[\\](.*)$/i) { }
983 0 0 scalar @_ > 1 ? :
984 0 0 if not defined $v or $v eq ''
991 0 0 scalar @_ > 1 ? :
992 0 0 if not defined $u or $u eq ''
999 0 0 unless (defined $_[0]{-'cache'}{-'unames'})
1001 0 0 unless defined $s->user
1004 0 0 $s->user =~ /^([^\@]+)\@(.+)$/ ? :
0 0 $s->useron =~ /^([^\@]+)\@(.+)$/ ? :
0 0 ref $$s{-'unmsadd'} ? :
0 0 ref $$s{-'unmsadd'} eq 'ARRAY' ? :
1017 0 0 unless grep /^\Q$v\E$/, @{$$s{-'cache'}{-'unames'};}
1025 0 0 if (not $_[0]{-'cache'}{-'usdomain'} or $_[1])
1036 0 0 if (not $_[0]{-'cache'}{-'userver'} or $_[1])
1047 0 0 if (not defined $_[0]{-'cache'}{-'ugroups'} or $_[1] and lc($_[0]->useron || '') ne lc $_[1] and lc($_[0]->user || '') ne lc $_[1])
1052 0 0 unless defined $s->user or $_[1]
1054 0 0 ref $$s{-'ugroups'} eq 'CODE' ? :
1056 0 0 if ($_[0]{-'ugrpcnv'})
1061 0 0 if defined $_ and $_ ne ''
1065 0 0 if ($_[0]{-'ugrpadd'})
1067 0 0 ref $$s{-'ugrpadd'} eq 'CODE' ? :
1068 0 0 ref $ugadd eq 'HASH' ? :
0 0 ref $ugadd eq 'ARRAY' ? :
1073 0 0 unless grep /^\Q$e\E$/i, @$r
1079 0 0 if not $_[1] or lc $_[0]->useron eq lc $_[1] or lc $_[0]->user eq lc $_[1]
1090 0 0 unless (defined $_[0]{-'cache'}{-'ugnames'})
1092 0 0 unless defined $s->user
1103 0 0 defined $_[0] && substr($_[0], 0, 1) eq '-' ? :
1105 0 0 ref $$s{-'uglist'} eq 'CODE' ? :
1107 0 0 if ($$s{-'ugrpadd'})
1109 0 0 ref $$s{-'ugrpadd'} eq 'CODE' ? :
1110 0 0 if (ref $r eq 'HASH' and ref $ugadd eq 'HASH') { }
1113 0 0 unless $$r{$e}
1117 0 0 ref $ugadd eq 'HASH' ? :
0 0 ref $ugadd eq 'ARRAY' ? :
1122 0 0 if (ref $r eq 'HASH') { }
1123 0 0 unless $$r{$e}
1126 0 0 unless grep /^\Q$e\E$/i, @$r
1131 0 0 if ref $r eq 'ARRAY'
1133 0 0 if ($$s{-'ugrpcnv'})
1135 0 0 if (ref $r eq 'ARRAY') { }
1139 0 0 if defined $_ and $_ ne ''
1148 0 0 if (defined $_ and $_ ne '') { }
0 0 elsif (not defined $_ or $_ eq '' or $_ ne $k) { }
1150 0 0 if $w
1165 0 0 ref $_[0] ? :
1166 0 0 unless lc $n eq lc $_
0 0 if grep {lc $s->usercn($n) eq lc $s->usercn($_) unless lc $n eq lc $_;} @$r
1176 0 0 ($$s{-'login'} || '') =~ m[/$]i ? :
0 0 !(($ENV{'SERVER_SOFTWARE'} || '') =~ /IIS/) ? :
0 0 unless defined $$s{-'w32IISdpsn'}
1182 0 0 $$s{-'userauth'} ? :
0 0 ref $$s{-'userauth'} eq 'ARRAY' ? :
0 0 ref $$s{-'userauth'} eq 'CODE' ? :
1193 0 0 if ($$s{-'cache'}{-'userauth'}) { }
0 0 elsif ($s->uguest and defined $$s{-'cgi'}->param('_auth') || defined $$s{-'cgi'}->param('_login')) { }
0 0 elsif (($ENV{'SERVER_SOFTWARE'} || '') =~ /IIS/ and $s->url =~ m[/_*(login|auth|a|ntlm|search|guest)/]i) { }
1203 0 0 !defined($$s{-'w32IISdpsn'}) ? :
0 0 if not $url =~ m[/_*(search|guest)/]i and (not $$s{-'cache'}{-'RevertToSelf'} and !defined($$s{-'w32IISdpsn'}) ? ($$s{-'login'} || '') =~ m[/$]i : $$s{-'w32IISdpsn'} > 1) and not $s->uauth->signget
1207 0 0 if (($s->qparam('_run') || '') ne 'SEARCH' and not $$s{-'cache'}{-'RevertToSelf'} and !defined($$s{-'w32IISdpsn'}) || $$s{-'w32IISdpsn'} > 1)
1212 0 0 $ENV{'QUERY_STRING'} ? :
1228 0 0 if defined $_[0]{-'w32IISdpsn'} and not $_[0]{-'w32IISdpsn'} or $_[0]{-'cache'}{-'RevertToSelf'} or $^O ne 'MSWin32' or not +($ENV{'SERVER_SOFTWARE'} || '') =~ /IIS/ or $ENV{'FCGI_SERVER_VERSION'}
1236 0 0 if ($o and $o->Call and $l ne (eval { do { Win32::LoginName() } } || '')) { }
1238 0 0 defined $_[0]{-'w32IISdpsn'} ? :
0 0 $_[0]{-'debug'} > 2 ? :
0 0 if $_[1] and $_[0]{-'debug'}
1242 0 0 $_ ? :
1253 0 0 substr($_[0], 0, 1) eq '-' ? :
1254 0 0 ref $_[$#_] eq 'CODE' ? :
1257 0 0 unless $opt =~ /h/
1259 0 0 if ($^X =~ /(?:perlis|perlex)\d*\.dll$/i) { }
1260 0 0 if ($sub) { }
1261 0 0 unless open WTRFH, '|' . join(' ', @_) and defined *WTRFH
1269 0 0 if (not $opt =~ /h/ and $_[0] =~ /cacls/) { }
1282 0 0 if ($pid)
1283 0 0 if ($sub)
1295 0 0 if $o and not $opt =~ /h/
1296 0 0 unless $o
0 0 !($opt =~ /h/) ? :
0 0 if $r and not $opt =~ /i/
1307 0 0 @_ == 1 && ref $_[0] ? :
0 0 !defined($_[0]) ? :
1308 0 0 if (ref $$s{-'httpheader'})
1310 0 0 unless (exists $p{$k})
1319 0 0 @_ == 1 && ref $_[0] ? :
0 0 !defined($_[0]) ? :
1320 0 0 if (ref $$s{-'htmlstart'})
1322 0 0 unless (exists $p{$k})
1325 0 0 unless exists $p{-'style'}
1336 0 0 $$s{-'debug'} && $$s{-'debug'} > 2 ? :
1344 0 0 if $_[0]{-'debug'} and $_[0]{-'debug'} > 3
1372 0 0 ($ENV{'HTTP_USER_AGENT'} || '') =~ m[^[^/]+/(\d)] ? :
0 0 $$s{-'httpheader'} ? :
0 0 $_[2] ? :
0 0 $$s{-'httpheader'} ? :
0 0 $_[2] ? :
0 0 (($ENV{'HTTP_USER_AGENT'} || '') =~ m[^[^/]+/(\d)] ? $1 >= 3 : 0) ? :
1384 0 0 !defined($_[1]) ? :
1403 0 0 if $e =~ /  /
1409 0 0 !defined($_[1]) ? :
1414 0 0 $ENV{'QUERY_STRING'} ? :
0 0 if scalar @_ < 2
1416 0 0 unless defined $rsp
1417 0 0 if $rsp ne '' and substr($rsp, length($rsp) - 1, 0) eq '/'
1419 0 0 $rsp =~ /\?/ ? :
1422 0 0 !defined($_) ? :
1510 0 0 $$s[0]{-'cache'}{-'httpheader'} ? :
1517 0 0 $$s[0]{-'cache'}{-'htmlstart'} ? :
1525 0 0 $_[0][0]{-'cache'}{-'htpgstart'} ? :
1539 0 0 ($ENV{'HTTP_USER_AGENT'} || '') =~ m[^[^/]+/(\d)] ? :
0 0 $_[0][0]{-'httpheader'} ? :
0 0 $_[3] ? :
0 0 $_[0][0]{-'httpheader'} ? :
0 0 $_[3] ? :
0 0 (($ENV{'HTTP_USER_AGENT'} || '') =~ m[^[^/]+/(\d)] ? $1 >= 3 : 0) ? :