| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::CIA::Parser; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 5.005_62; |
|
4
|
3
|
|
|
3
|
|
954562
|
use strict; |
|
|
3
|
|
|
|
|
8
|
|
|
|
3
|
|
|
|
|
113
|
|
|
5
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
80
|
|
|
6
|
3
|
|
|
3
|
|
558
|
use WebService::CIA; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
1441
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.4'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
|
11
|
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
1
|
21
|
my $proto = shift; |
|
13
|
3
|
|
|
|
|
12
|
my $source = shift; |
|
14
|
3
|
|
33
|
|
|
62
|
my $class = ref($proto) || $proto; |
|
15
|
3
|
|
|
|
|
11
|
my $self = {}; |
|
16
|
3
|
|
|
|
|
1070
|
bless ($self, $class); |
|
17
|
3
|
|
|
|
|
20
|
return $self; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub parse { |
|
23
|
|
|
|
|
|
|
|
|
24
|
2
|
|
|
2
|
1
|
1525
|
my ($self, $cc, $html) = @_; |
|
25
|
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
27
|
my $data = { |
|
27
|
|
|
|
|
|
|
'URL - Flag' => $WebService::CIA::base_url . 'flags/' . $cc . '-flag.gif', |
|
28
|
|
|
|
|
|
|
'URL - Map' => $WebService::CIA::base_url . 'maps/' . $cc . '-map.gif', |
|
29
|
|
|
|
|
|
|
'URL' => $WebService::CIA::base_url . 'geos/' . $cc . '.html', |
|
30
|
|
|
|
|
|
|
'URL - Print' => $WebService::CIA::base_url . 'print/' . $cc . '.html' |
|
31
|
|
|
|
|
|
|
}; |
|
32
|
2
|
|
|
|
|
59
|
while ($html =~ m# |
|
33
|
|
|
|
|
|
|
| ]+ class="FieldLabel">.*? |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
(.+?): |
|
36
|
|
|
|
|
|
|
.*?.*? |
|
37
|
|
|
|
|
|
|
| .*?
|
38
|
|
|
|
|
|
|
| ]+> |
|
39
|
|
|
|
|
|
|
(.*?) |
|
40
|
|
|
|
|
|
|
( | |
)