line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::IODEF::Simple::Plugin::RI_RESTRICTION; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
34991
|
use 5.008008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
175
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.00_01'; |
8
|
|
|
|
|
|
|
$VERSION = eval $VERSION; # see L |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Preloaded methods go here. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $map = { |
13
|
|
|
|
|
|
|
limited => 'need-to-know', |
14
|
|
|
|
|
|
|
restricted => 'private', |
15
|
|
|
|
|
|
|
privileged => 'need-to-know', |
16
|
|
|
|
|
|
|
default => 'private', |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub prepare { |
20
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
21
|
0
|
|
|
|
|
|
my $info = shift; |
22
|
0
|
0
|
|
|
|
|
return unless($info->{'restriction'}); |
23
|
0
|
0
|
|
|
|
|
return unless(exists($map->{lc($info->{'restriction'})})); |
24
|
0
|
|
|
|
|
|
return(1); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub convert { |
28
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
29
|
0
|
|
|
|
|
|
my $info = shift; |
30
|
0
|
|
|
|
|
|
my $iodef = shift; |
31
|
0
|
|
|
|
|
|
my $r = lc($info->{'restriction'}); |
32
|
0
|
|
|
|
|
|
$info->{'restriction'} = $map->{$r}; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return($iodef); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
__END__ |