line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::HIBP::Breach; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
15
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1195
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
403
|
|
|
403
|
1
|
1773
|
my ( $class, %parameters ) = @_; |
10
|
403
|
|
|
|
|
731
|
my $self = bless {}, $class; |
11
|
403
|
|
|
|
|
1391
|
foreach my $key ( sort { $a cmp $b } keys %parameters ) { |
|
16122
|
|
|
|
|
21041
|
|
12
|
6045
|
100
|
|
|
|
23466
|
if ( $key =~ /^Is/smx ) { |
13
|
2015
|
100
|
|
|
|
4313
|
$self->{$key} = $parameters{$key} ? 1 : 0; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
else { |
16
|
4030
|
|
|
|
|
6850
|
$self->{$key} = $parameters{$key}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
403
|
|
|
|
|
1796
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub name { |
23
|
1
|
|
|
1
|
1
|
8
|
my ($self) = @_; |
24
|
1
|
|
|
|
|
8
|
return $self->{Name}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub title { |
28
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
29
|
0
|
|
|
|
|
0
|
return $self->{Title}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub domain { |
33
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
34
|
0
|
|
|
|
|
0
|
return $self->{Domain}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub description { |
38
|
401
|
|
|
401
|
1
|
1422
|
my ($self) = @_; |
39
|
401
|
|
|
|
|
704
|
return $self->{Description}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub breach_date { |
43
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
44
|
0
|
|
|
|
|
0
|
return $self->{BreachDate}; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub modified_date { |
48
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
49
|
0
|
|
|
|
|
0
|
return $self->{ModifiedDate}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub is_retired { |
53
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
54
|
0
|
|
|
|
|
0
|
return $self->{IsRetired}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub is_sensitive { |
58
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
59
|
0
|
|
|
|
|
0
|
return $self->{IsSensitive}; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub is_verified { |
63
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
64
|
0
|
|
|
|
|
0
|
return $self->{IsVerified}; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub is_spam_list { |
68
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
69
|
0
|
|
|
|
|
0
|
return $self->{IsSpamList}; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub is_fabricated { |
73
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
74
|
0
|
|
|
|
|
0
|
return $self->{IsFabricated}; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub pwn_count { |
78
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
79
|
0
|
|
|
|
|
0
|
return $self->{PwnCount}; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub added_date { |
83
|
5932
|
|
|
5932
|
1
|
11545
|
my ($self) = @_; |
84
|
5932
|
|
|
|
|
9980
|
return $self->{AddedDate}; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub data_classes { |
88
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
89
|
0
|
0
|
|
|
|
|
if ( defined $self->{DataClasses} ) { |
90
|
0
|
|
|
|
|
|
return @{ $self->{DataClasses} }; |
|
0
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
else { |
93
|
0
|
|
|
|
|
|
return (); |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub logo_path { |
98
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
99
|
0
|
|
|
|
|
|
return $self->{LogoPath}; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
1; # End of WebService::HIBP::Breach |
103
|
|
|
|
|
|
|
__END__ |