Branch Coverage

blib/lib/WWW/RobotRules/Parser/MultiValue.pm
Criterion Covered Total %
branch 42 52 80.7


line true false branch
33 92 0 unless blessed $uri and $uri->isa('URI')
34 0 92 unless $uri->can('host') and $uri->can('port')
50 0 16 unless $uri = _uri($uri)
59 0 20 unless $robots_txt_uri = _uri($robots_txt_uri)
69 27 108 if $line =~ /^\s*$/u
71 17 91 if ($line =~ /^User-Agent\s*:\s*(.*)$/iu) { }
74 22 69 unless $ua
76 69 0 if ($line =~ /^([^:]+?)\s*:\s*(.*)$/u)
78 69 0 if (my $method = {allow => '_translate_path_pattern', crawl-delay => '_translate_delay', disallow => '_translate_path_pattern', request-rate => '_translate_rate'}->{$rule})
83 11 58 unless $rule
85 30 28 if ($ua eq 'me') { }
103 8 21 if $pattern eq '*'
104 9 12 if index(lc $self->_short_agent, lc $pattern) >= 0
117 0 56 unless $uri = _uri($uri)
122 14 122 if _match_path $path_query, $pattern
125 20 42 if _match_path $path_query, $pattern
133 12 4 if defined $delay
140 21 0 if $name =~ /^(\S+)/u
151 7 43 unless $uri->scheme eq $base_uri->scheme
152 0 50 unless lc $uri->host eq lc $base_uri->host
153 7 43 unless $uri->port eq $base_uri->port
155 0 50 if $@
156 7 43 if $ignore
163 1 6 unless $value =~ qr/\A[0-9.]+\z/u
169 1 11 unless $value =~ qr"\A([0-9.]+)\s*/\s*([0-9.]+)\z"u
170 2 9 unless $1 + 0