FreeProxy/PublicProxyServers.pm

filter: Statementstmt 50.0% 4 / 8 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod 100% 1 / 1 totaltotal 40.0% 6 / 15 CC 4 SCAR 27.9
CC
4
Cov
33%
fetch
20.0
BEGIN
1.0
CRAP 16.2
« FreeProxy/Proxy4Free.pm ↑ Summary FreeProxy/Look.pm »
1 package WWW::FreeProxy::PublicProxyServers;
2  
3 1 ▶use LWP::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 =head1 FUNCTIONS
6  
7 =head2 fetch
8  
9 Fetches proxy list
10  
11 =cut
12  
13 0 ▶sub fetch {
Subroutine fetch: not called CC=4 SCAR=30.0
Pod documented
14 0 my ($self, $callback) = @_;
15 0 for (1..6) {
16 0 ▶ my $content = get("http://www.publicproxyservers.com/page$_.html") or return [];
Branch: 1 branch
BranchTrueFalseTotal
my $content = &get("http://www.publicproxyservers.com/page$_.html") or return [] 0 0 0
17 0 ▶ &$callback("$1:$2") while $content =~ m~<td[^>]*?>(\d+\.\d+\.\d+\.\d+)</td>.*?<td[^>]*?>(\d+)</td>~igs;
Branch: 1 branch
BranchTrueFalseTotal
$content =~ m[<td[^>]*?>(\d+\.\d+\.\d+\.\d+)</td>.*?<td[^>]*?>(\d+)</td>]sig and do { &$callback("$1:$2") } 0 0 0
18 }
19 }
20  
21 1 1;
22  
23 =head1 COPYRIGHT & LICENSE
24  
25 Copyright 2008 Alexey Alexandrov, all rights reserved.
26  
27 This program is free software; you can redistribute it and/or modify it
28 under the same terms as Perl itself.
29  
30 =cut
« FreeProxy/Proxy4Free.pm ↑ Summary FreeProxy/Look.pm »