line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Terror::AU; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
## Get and return the current AU terrorist threat status. |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1642
|
use 5.00503; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
40
|
|
6
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
23
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
68
|
|
9
|
|
|
|
|
|
|
$VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
6
|
use constant UNKNOWN => 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
12
|
1
|
|
|
1
|
|
5
|
use constant CRITICAL => 1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
13
|
1
|
|
|
1
|
|
5
|
use constant SEVERE => 2; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
49
|
|
14
|
1
|
|
|
1
|
|
6
|
use constant SUBSTANTIAL => 3; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
80
|
|
15
|
1
|
|
|
1
|
|
5
|
use constant MODERATE => 4; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
16
|
1
|
|
|
1
|
|
5
|
use constant LOW => 5; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
295
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
0
|
|
|
0
|
1
|
|
my ($class, %args) = @_; |
21
|
0
|
0
|
|
|
|
|
$class = ref($class) if (ref $class); |
22
|
0
|
|
|
|
|
|
return bless(\%args, $class); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub fetch { |
26
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
27
|
0
|
|
|
|
|
|
return ''; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub level { |
31
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
32
|
0
|
|
|
|
|
|
my $level = $self->fetch(); |
33
|
0
|
0
|
|
|
|
|
return UNKNOWN unless ($level); |
34
|
0
|
0
|
|
|
|
|
if ($level eq 'CRITICAL') { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return CRITICAL; |
36
|
|
|
|
|
|
|
} elsif ($level eq 'SEVERE') { |
37
|
0
|
|
|
|
|
|
return SEVERE; |
38
|
|
|
|
|
|
|
} elsif ($level eq 'SUBSTANTIAL') { |
39
|
0
|
|
|
|
|
|
return SUBSTANTIAL; |
40
|
|
|
|
|
|
|
} elsif ($level eq 'MODERATE') { |
41
|
0
|
|
|
|
|
|
return MODERATE; |
42
|
|
|
|
|
|
|
} elsif ($level eq 'LOW') { |
43
|
0
|
|
|
|
|
|
return LOW; |
44
|
|
|
|
|
|
|
} else { |
45
|
0
|
|
|
|
|
|
return UNKNOWN; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |