Branch Coverage

blib/lib/WWW/IndexParser.pm
Criterion Covered Total %
branch 4 248 1.6


line true false branch
40 0 1 if (defined $args{'timeout'}) { }
41 0 0 if ($args{'timeout'} =~ /^\d+/) { }
50 0 1 if (defined $args{'proxy'})
53 0 1 if (defined $args{'debug'}) { }
60 0 1 if (defined $args{'url'})
62 0 0 if defined $$self{'files'}
72 0 0 if (@_)
74 0 0 if $$self{'debug'}
77 0 0 if ($new_url =~ m[^([^:]+)://([^:/]+)(:(\d+))?]) { }
80 0 0 if defined $4
83 0 0 unless ($$self{'res'}->is_success)
84 0 0 if $$self{'debug'}
92 0 0 if (ref $$self{'res'}->headers->{'content-type'} eq 'ARRAY') { }
0 0 elsif (not $$self{'res'}->headers->{'content-type'} =~ m[^text/html]) { }
95 0 0 if m[^text/html]
97 0 0 unless ($found_html)
106 0 0 if ($$self{'res'}->headers->{'server'} =~ /^Apache-Coyote/) { }
0 0 elsif ($$self{'res'}->headers->{'server'} =~ /^Apache/) { }
0 0 elsif ($$self{'res'}->headers->{'server'} =~ /^Microsoft-IIS/) { }
0 0 elsif ($$self{'res'}->headers->{'server'} =~ m[^lighttpd/]) { }
107 0 0 if $$self{'debug'}
111 0 0 if $$self{'debug'}
115 0 0 if $$self{'debug'}
119 0 0 if $$self{'debug'}
123 0 0 if $$self{'debug'}
132 0 0 if ($entry->filename =~ m[^/]) { }
133 0 0 defined $$self{'port'} ? :
149 0 0 if (not defined $tagname) { }
0 0 elsif ($tagname eq 'title') { }
0 0 elsif ($tagname eq 'hr' and $$self{'parser_state'} and defined $$self{'current_file'}) { }
0 0 elsif ($tagname eq 'tr' and defined $$self{'parser_state'}) { }
0 0 elsif ($tagname eq 'a' and defined $$self{'parser_state'}) { }
150 0 0 unless $$self{'parser_state'}
152 0 0 if ($$self{'parser_state'} == 2)
153 0 0 if $$self{'debug'}
154 0 0 if ($origtext =~ /^Directory Listing For (.+)$/)
160 0 0 if ($$self{'parser_state'} == 1 and $origtext =~ /^([\d\.]+)(\s+(\w+))?/)
163 0 0 if defined $3
165 0 0 if ($$self{'parser_state'} == 1 and $origtext =~ /^\w+,\s+(\d+)\s+(\w+)\s+(\d+)\s+(\d+):(\d+):(\d+)\s+(\w+)/)
173 0 0 if defined $$self{'current_file'}{'filename'}
174 0 0 if defined $$self{'current_file'}{'time'}
175 0 0 if defined $$self{'current_file'}{'size'}
176 0 0 if defined $$self{'current_file'}{'size_units'}
181 0 0 if (defined $$self{'current_file'})
183 0 0 if defined $$self{'current_file'}{'filename'}
184 0 0 if defined $$self{'current_file'}{'time'}
185 0 0 if defined $$self{'current_file'}{'size'}
186 0 0 if defined $$self{'current_file'}{'size_units'}
192 0 0 if $$self{'debug'}
193 0 0 if $$attr{'href'}
202 0 0 if (not defined $tagname) { }
0 0 elsif ($tagname eq 'title') { }
0 0 elsif ($tagname eq 'pre') { }
0 0 elsif ($tagname eq 'img' || $tagname eq 'hr' and defined $$self{'parser_state'}) { }
0 0 elsif ($tagname eq 'a' and defined $$self{'parser_state'}) { }
203 0 0 unless $$self{'parser_state'}
205 0 0 if ($$self{'parser_state'} == 2)
206 0 0 if $$self{'debug'}
207 0 0 if ($origtext =~ /^Index of (.+)$/)
213 0 0 if ($origtext =~ /(\d\d)-(\w\w\w)-(\d{4}) (\d\d):(\d\d)\s+([\d\.]+)(\w)?/) { }
0 0 elsif ($origtext =~ /(\d\d)-(\w\w\w)-(\d{4}) (\d\d):(\d\d)/) { }
0 0 elsif ($origtext =~ /^(\d[\d\.]+)(\w)?/) { }
217 0 0 if defined $7
221 0 0 if $$self{'debug'}
223 0 0 if $$self{'debug'}
225 0 0 if defined $2
232 0 0 if (defined $$self{'current_file'} and not $$self{'current_file'}{'filename'} =~ /^\?/ and not $$self{'current_file'}{'type'} =~ /Icon/)
234 0 0 if defined $$self{'current_file'}{'filename'}
235 0 0 if defined $$self{'current_file'}{'time'}
236 0 0 if defined $$self{'current_file'}{'type'}
237 0 0 if defined $$self{'current_file'}{'size'}
238 0 0 if defined $$self{'current_file'}{'size_units'}
240 0 0 if $$self{'debug'}
243 0 0 if (defined $$attr{'alt'})
244 0 0 if $$self{'debug'}
248 0 0 if $$self{'debug'}
249 0 0 if defined $$attr{'href'}
251 0 0 if $$self{'debug'}
263 0 0 if (not defined $tagname) { }
0 0 elsif ($tagname eq 'title') { }
0 0 elsif ($tagname eq 'pre') { }
0 0 elsif ($tagname eq 'br' and defined $$self{'parser_state'}) { }
0 0 elsif ($tagname eq 'a' and defined $$self{'parser_state'}) { }
264 0 0 unless $$self{'parser_state'}
266 0 0 if ($$self{'parser_state'} == 2)
267 0 0 if ($origtext =~ /- (.+)$/)
273 0 0 if ($origtext =~ /\s*(\w+),\s+(\w+)\s+(\d+),\s+(\d{4})\s+(\d{1,2}):(\d\d) (AM|PM)\s+([\d\.]+)/)
275 0 0 if $7 eq 'AM' and $hour_of_day eq 12
276 0 0 if $7 eq 'PM' and $hour_of_day ne 12
286 0 0 if (defined $$self{'current_file'})
288 0 0 if defined $$self{'current_file'}{'filename'}
289 0 0 if defined $$self{'current_file'}{'time'}
290 0 0 if defined $$self{'current_file'}{'size'}
291 0 0 if defined $$self{'current_file'}{'size_units'}
296 0 0 if $$self{'debug'}
297 0 0 if defined $$attr{'href'}
305 0 0 if (not defined $tagname) { }
0 0 elsif ($tagname eq 'title') { }
0 0 elsif ($tagname eq 'td') { }
0 0 elsif ($tagname eq 'tr') { }
0 0 elsif ($tagname eq 'a' and defined $$self{'parser_state'}) { }
306 0 0 unless $$self{'parser_state'}
308 0 0 if ($$self{'parser_state'} eq 'title')
309 0 0 if $$self{'debug'}
310 0 0 if ($origtext =~ m[^Index of (.+)/$])
317 0 0 if ($$self{'parser_state'} eq 'time') { }
0 0 elsif ($$self{'parser_state'} eq 'size') { }
0 0 elsif ($$self{'parser_state'} eq 'type') { }
318 0 0 if ($origtext =~ /^(\d{4})-(\w\w\w)-(\d\d) (\d\d):(\d\d):(\d\d)$/)
323 0 0 if ($origtext =~ /^([\d\.]+)(\w)?/)
325 0 0 if defined $2
328 0 0 if ($origtext =~ m[^[\w\-/]+$])
338 0 0 if $state
340 0 0 if (defined $$self{'current_file'})
342 0 0 if defined $$self{'current_file'}{'filename'}
343 0 0 if defined $$self{'current_file'}{'time'}
344 0 0 if defined $$self{'current_file'}{'type'}
345 0 0 if defined $$self{'current_file'}{'size'}
346 0 0 if defined $$self{'current_file'}{'size_units'}
348 0 0 if $$self{'debug'}
351 0 0 if $$self{'debug'}
354 0 0 if $$self{'debug'}
355 0 0 if defined $$attr{'href'}
357 0 0 if $$self{'debug'}