Branch Coverage

blib/lib/Net/IMP/HTTP/Example/SaveResponse.pm
Criterion Covered Total %
branch 0 106 0.0


line true false branch
23 0 0 unless my $dir = $args{'root'}
24 0 0 unless -d $dir and -r _ and -x _
25 0 0 unless defined $args{'limit'}
43 0 0 if $$self{'file'} and $$self{'file'}{'tname'}
50 0 0 if $hdr =~ /\nHost: *(\S+)/i
51 0 0 unless $host
54 0 0 $host =~ s/^(?:\[(\w._\-:)+\]|(\w._\-))(?::(\d+))?$/$2 unless $1;/e ? :
55 0 0 unless $1
58 0 0 if (my $rx = $$self{'factory_args'}{'only_url'})
59 0 0 unless "${proto}://${host}:$port$path" =~ /$rx/ or "${proto}://$host$path" =~ /$rx/
62 0 0 if (my $rx = $$self{'factory_args'}{'exclude_url'})
63 0 0 if "${proto}://${host}:$port$path" =~ /$rx/ or "${proto}://$host$path" =~ /$rx/
66 0 0 if (my $srh = $$self{'factory_args'}{'method'})
67 0 0 unless _check_srh($srh, $method)
72 0 0 unless (-d $dir)
76 0 0 unless my($fh, $fname) = tempfile('tmpXXXXXXX', 'DIR', $dir)
82 0 0 $path =~ s/\?(.+)// ? :
95 0 0 if defined $qstring and not $$self{'factory_args'}{'ignore_parameters'}
111 0 0 unless my $f = $$self{'file'}
114 0 0 if ($data ne '')
116 0 0 if (my $l = $$self{'factory_args'}{'limit'})
117 0 0 if $$f{'size'}[1] > $l
119 0 0 unless ($md)
120 0 0 if $$self{'factory_args'}{'ignore_parameters'}
126 0 0 if (defined(my $rp = $$f{'rphdr'}))
129 0 0 if (defined($rp = $$f{'rpbody'}))
139 0 0 unless my $f = $$self{'file'}
140 0 0 if $hdr =~ m[\AHTTP/1\.[01] (100|304|5\d\d)]
141 0 0 if (my $srh = $$self{'factory_args'}{'content_type'})
144 0 0 unless _check_srh($srh, lc $ct)
148 0 0 if (defined $$f{'rphdr'}) { }
158 0 0 unless my $f = $$self{'file'}
160 0 0 if (my $l = $$self{'factory_args'}{'limit'})
161 0 0 if $$f{'size'}[3] > $l
163 0 0 if ($data eq '') { }
0 0 elsif (defined $$f{'rpbody'}) { }
174 0 0 unless my $f = $$self{'file'}
175 0 0 unless ($$f{'eof'} |= $bit) == 3
179 0 0 $$f{'md5data'} ? :
190 0 0 unless my $f = $$self{'file'}
200 0 0 unless defined $dir and -d $dir
202 0 0 if (my $limit = delete $cfg{'limit'})
203 0 0 unless looks_like_number $limit
207 0 0 if ref $v and not ref $v ~~ ['Regexp', 'HASH']
212 0 0 if ref $v ne 'Regexp'
225 0 0 if ($v =~ m[^/(.*)/$]s) { }
0 0 elsif ((my(@v) = split(/,/, $v, 0)) > 1) { }
226 0 0 unless $cfg{$k} = eval { do { qr/$1/ } }
235 0 0 unless $v =~ m[^/(.*)/$]s
236 0 0 unless $cfg{$k} = eval { do { qr/$1/ } }
243 0 0 if ref $srh eq 'Regexp'
244 0 0 if ref $srh eq 'HASH'
250 0 0 unless my $f = $$self{'file'}