Branch Coverage

blib/lib/WWW/RobotRules.pm
Criterion Covered Total %
branch 58 76 76.3


line true false branch
16 20 0 if $class eq 'WWW::RobotRules'
48 33 165 if /^\s*\#/
52 37 128 if (/^\s*$/) { }
54 74 elsif (/^\s*User-Agent\s*:\s*(.*)/i) { }
72 2 elsif (/^\s*Disallow\s*:\s*(.*)/i) { }
2 0 elsif (/\S\s*:/) { }
53 6 31 if $is_me
61 11 43 if ($seen_disallow)
64 3 8 if $is_me
68 0 51 if ($is_me) { }
15 36 elsif ($ua eq '*') { }
13 23 elsif ($self->is_me($ua)) { }
80 0 72 unless (defined $ua)
81 0 0 if $^W
87 65 7 if (length $disallow)
91 11 54 if $u->scheme ne $robot_txt_uri->scheme
92 7 50 if lc $u->host ne lc $robot_txt_uri->host
93 6 51 if $u->port ne $robot_txt_uri->port
95 11 46 unless length $disallow
97 8 57 if $@
98 13 44 if $ignore
101 13 38 if ($is_me) { }
17 21 elsif ($is_anon) { }
112 0 0 if $^W
116 13 9 if ($is_me) { }
136 13 23 if (index(lc $me, lc $ua_line) >= 0) { }
149 0 53 unless $uri->scheme eq 'http' or $uri->scheme eq 'https'
155 5 48 if not defined $fresh_until or $fresh_until < time
160 6 35 unless length $rule
161 18 17 if index($str, $rule) == 0
190 20 35 if ($name)
196 20 0 if $name =~ /(\S+)/
198 20 0 unless ($old and $old eq $name)
209 0 0 unless $netloc
213 0 0 if (not defined $$count) { }
237 20 50 if (defined $fresh_until)
258 47 0 if (defined $$self{'loc'}{$netloc}{'rules'}) { }
271 0 0 if $_ eq 'loc'