Branch Coverage

blib/lib/App/HTTP_Proxy_IMP/IMP/FakeResponse.pm
Criterion Covered Total %
branch 4 54 7.4


line true false branch
18 0 1 unless my $dir = $args{'root'}
19 0 1 unless -d $dir and -r _ and -x _
30 0 1 if (not $dir) { }
0 1 elsif (not -d $dir && -r _ && -x _) { }
42 0 0 if $hdr =~ /\nHost: *(\S+)/i
43 0 0 unless ($host)
49 0 0 $host =~ s/^(?:\[(\w._\-:)+\]|(\w._\-))(?::(\d+))?$/$2 unless $1;/e ? :
50 0 0 unless $1
54 0 0 unless -d $dir
57 0 0 $path =~ s/\?(.+)// ? :
68 0 0 if $self->{'factory_args'}{'ignore_parameters'}
70 0 0 if defined $qstring
72 0 0 if ($method ~~ ['GET', 'HEAD'])
73 0 0 if $file{'md5data'}
79 0 0 unless -f $fname or glob "$fname-*"
87 0 0 if ($self->{'response'} = _extract_response($fname))
107 0 0 unless my $f = $self->{'file'}
109 0 0 if ($data ne '')
120 0 0 $f->{'md5data'} ? :
124 0 0 if ($self->{'response'} = _extract_response($fname))
145 0 0 unless my $rphdr = $self->{'response'} && $self->{'response'}[0]
148 0 0 unless $rphdr =~ s/(\nContent-length:[ \t]*)\d+/$1$clen/
156 0 0 unless my $rp = $self->{'response'}
168 0 0 unless $self->{'file'}
178 0 0 unless open my $fh, '<', $fname
180 0 0 if ($data =~ s[\A(HTTP/1\.[01] .*?(\r?\n)\2)][]s) { }
185 0 0 if ($size[0] + $size[1] + $size[2] + $size[3] + 16 == length $data)