Branch Coverage

lib/CGI/PathRequest.pm
Criterion Covered Total %
branch 84 128 65.6


line true false branch
16 1 19 if (defined $self and ref $self ne 'HASH')
23 0 20 if $$self{'tainted_request'}
29 0 20 if $$self{'tainted_request'}
31 0 20 if $$self{'default'}
37 19 1 if ($self->_arg)
39 6 13 unless $self->set($self->_arg)
48 297 13 if (defined $$self{'data'}{'exists'})
51 13 0 -e $self->abs_path ? :
62 20 19 unless (defined $$self{'_arg'})
66 14 6 if (defined $$self{'rel_path'}) { }
5 1 elsif (my $fromcgi = $self->_get_rel_path_from_cgi) { }
92 1 19 unless defined $argument
93 0 19 unless $self->DOCUMENT_ROOT
94 13 6 if (-e $self->DOCUMENT_ROOT . '/' . $argument)
110 5 37 unless (defined $$self{'_data'}{'_network'})
114 0 5 if (defined $$self{'SERVER_NAME'}) { }
0 5 elsif (defined $ENV{'SERVER_NAME'}) { }
5 0 elsif ($self->get_cgi->server_name) { }
126 5 0 if ($$data{'server_name'})
128 0 5 if ($self->get_cgi->https) { }
193 0 74 if $self->errstr
195 65 9 if (defined $$self{'_data'}{'_extended'})
205 2 7 if ($self->is_dir) { }
7 0 elsif ($self->is_file) { }
215 0 9 $self->is_DOCUMENT_ROOT ? :
217 0 9 unless $$data{'filename_pretty'} = $self->filename_only
230 5 6 unless $self->is_text
231 4 2 unless $self->ext =~ /s?html?$/i
260 0 40 if $self->errstr
262 9 31 unless (defined $$self{'_data'}{'_extended_more'})
265 7 2 unless ($self->is_dir)
271 7 2 $self->is_file ? :
298 0 33 if $self->errstr
300 2 31 unless $self->is_text
303 4 27 unless (defined $$self{'_data'}{'_guts'})
317 4 0 if ($$guts{'content'})
377 0 20 unless $self->is_dir
380 4 16 unless (defined $$self{'_data'}{'_ls'})
383 0 4 unless opendir DIR, $self->abs_path
438 8 3 unless $self->is_dir
439 1 2 unless $self->ls_count
451 1 0 unless (defined $$self{'_data'}{'nav_loop'})
464 0 1 $r->is_dir ? :
478 1 6 unless $$element{$_} =~ /\w/
482 1 0 unless ($onetime)
514 0 0 unless $self->is_dir
515 0 0 if (scalar @{$self->lsd;})
538 0 0 unless $self->is_dir
539 0 0 if (scalar @{$self->lsf;})
562 0 0 unless $self->is_dir
564 0 0 if (scalar @{$self->ls;})
582 0 224 if (ref $$data{$_})
583 5 219 unless defined $$data{$_}
584 4 215 unless $$data{$_} =~ /\w/
601 18 0 if (defined $self->_network->{$_})
607 12 0 if (defined $self->_guts->{$_})
613 30 0 if (defined $self->_extended->{$_})
619 12 0 if (defined $self->_more->{$_})
651 1 5 unless my $req = $self->get_cgi->param($$self{'param_name'})
654 0 5 if ($req =~ s[^https\://|^http\://][])
657 0 5 if ($req =~ s/^www\.//)
661 5 0 if (my $server = $self->get_cgi->server_name)
665 0 5 if ($wasfullurl and not $req)
669 0 5 unless $req