line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Mechanize::Plugin::Web::Scraper; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
452557
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
915
|
use Web::Scraper; |
|
1
|
|
|
|
|
103257
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
##################################################################### |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
6907
|
sub import { } # This plugin does not have any import options |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub init { |
15
|
1
|
|
|
1
|
|
88
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
124
|
|
16
|
1
|
|
|
1
|
0
|
5316
|
*{caller(). '::scrape'} = \&scrape; |
|
1
|
|
|
|
|
11
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub scrape { |
20
|
0
|
|
|
0
|
1
|
|
my ($mech, @processes) = @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
0
|
|
|
my $scraper = scraper { process @processes }; |
|
0
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return $scraper->scrape($mech->response); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |