line |
true |
false |
branch |
33
|
115 |
0 |
unless blessed $uri and $uri->isa('URI') |
34
|
0 |
115 |
unless $uri->can('host') and $uri->can('port') |
50
|
0 |
22 |
unless $uri = _uri($uri) |
59
|
0 |
28 |
unless $robots_txt_uri = _uri($robots_txt_uri) |
69
|
43 |
159 |
if $line =~ /^\s*$/u |
71
|
41 |
118 |
if ($line =~ /^User-Agent\s*:\s*(.*)$/iu) { } |
74
|
32 |
86 |
unless $ua |
76
|
86 |
0 |
if ($line =~ /^([^:]+?)\s*:\s*(.*)$/u) |
78
|
86 |
0 |
if (my $method = {allow => '_translate_path_pattern', crawl-delay => '_translate_delay', disallow => '_translate_path_pattern', request-rate => '_translate_rate'}->{$rule}) |
83
|
11 |
75 |
unless $rule |
85
|
36 |
39 |
if ($ua eq 'me') { } |
94
|
20 |
8 |
unless ($self->ignore_default) |
105
|
16 |
37 |
if $pattern eq '*' |
106
|
15 |
22 |
if index(lc $self->_short_agent, lc $pattern) >= 0 |
119
|
0 |
65 |
unless $uri = _uri($uri) |
124
|
17 |
122 |
if _match_path $path_query, $pattern |
127
|
23 |
43 |
if _match_path $path_query, $pattern |
135
|
16 |
6 |
if defined $delay |
142
|
37 |
0 |
if $name =~ /^(\S+)/u |
153
|
7 |
52 |
unless $uri->scheme eq $base_uri->scheme |
154
|
0 |
59 |
unless lc $uri->host eq lc $base_uri->host |
155
|
7 |
52 |
unless $uri->port eq $base_uri->port |
157
|
0 |
59 |
if $@ |
158
|
7 |
52 |
if $ignore |
165
|
1 |
10 |
unless $value =~ qr/\A[0-9.]+\z/u |
171
|
1 |
15 |
unless $value =~ qr"\A([0-9.]+)\s*/\s*([0-9.]+)\z"u |
172
|
2 |
13 |
unless $1 + 0 |