blib/lib/WWW/Patent/Page/USPTO.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 42 | 82 | 51.2 |
line | true | false | branch |
---|---|---|---|
59 | 0 | 0 | if ('US' eq uc $country) { } |
67 | 1 | 11 | if (not $$self{'patent'}{'doc_type'} and length $$self{'patent'}{'number'} == 11) { } |
7 | 4 | elsif ($$self{'patent'}{'doc_type'}) { } | |
81 | 1 | 18 | if ($url =~ /$$self{'patent'}{'number'}/ and $text =~ /$$self{'patent'}{'number'}/) |
112 | 12 | 0 | if ($response->is_success) { } |
119 | 10 | 2 | if ($entry = $p->header('Refresh')) |
125 | 0 | 10 | unless $request = 'HTTP::Request'->new('GET', "$entry") |
131 | 1 | 11 | if ($html =~ /No patents have matched your query/) |
139 | 0 | 11 | unless ($html =~ s[.*?.*?][\n\n |
145 | 0 | 11 | unless ($html =~ s[.*( |
151 | 0 | 11 | unless ($html =~ s/ |
156 | 0 | 11 | unless ($html =~ s/ /is) |
159 | 0 | 11 | unless ($html =~ s[(.*) (.*)body>][$1]is) |
179 | 0 | 1 | if ($$self{'patent'}{'number'} =~ /(0|1|2|3|4)\d$/) { } |
188 | 0 | 1 | if ($$self{'patent'}{'doc_type'}) { } |
205 | 1 | 0 | if ($html =~ /NumPages=(\d+)/) { } |
0 | 0 | elsif ($html =~ /(\d+)\s+of\s+(\d+)\s+pages/) { } | |
224 | 1 | 1 | if ($url =~ /$$self{'patent'}{'number'}/) |
235 | 0 | 1 | unless $request = 'HTTP::Request'->new('GET', "$url") |
244 | 0 | 0 | if ($url =~ m[image/tiff]) |
249 | 0 | 1 | unless $request = 'HTTP::Request'->new('GET', "$url") |
263 | 0 | 1 | if $$self{'patent'}{'tempdir'} |
299 | 0 | 1 | if ($$self{'patent'}{'number'} =~ /(0|1|2|3|4)\d$/) { } |
307 | 0 | 1 | if ($$self{'patent'}{'doc_type'}) { } |
323 | 1 | 0 | if ($html =~ /NumPages=(\d+)/) { } |
0 | 0 | elsif ($html =~ /(\d+)\s+of\s+(\d+)\s+pages/) { } | |
341 | 1 | 1 | if ($url =~ /$$self{'patent'}{'number'}/) |
346 | 1 | 0 | if (defined $$self{'patent'}{'page'}) |
353 | 0 | 1 | unless $request = 'HTTP::Request'->new('GET', "$url") |
355 | 0 | 1 | unless $response = $self->request($request) |
368 | 1 | 9 | if ($url =~ /View\+first\+page/) |
373 | 0 | 1 | unless $request = 'HTTP::Request'->new('GET', "$url") |
375 | 0 | 1 | unless $response = $self->request($request) |
385 | 0 | 1 | if ($url =~ /tif$/) |
390 | 1 | 0 | if (defined $$self{'patent'}{'page'}) |
396 | 0 | 1 | unless $request = 'HTTP::Request'->new('GET', "$url") |
402 | 1 | 0 | if (defined $$self{'patent'}{'page'}) |
419 | 1 | 0 | if (not $done and $trys < 5) { } |
422 | 0 | 0 | if ($response->is_success and $response->content) { } |
443 | 0 | 0 | if ($$self{'patent'}{'page'}) |
452 | 0 | 0 | unless $request = 'HTTP::Request'->new('GET', "$tif_url") |