| 1 | package XML::IODEF::Simple::Plugin::RI_RESTRICTION; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.008008; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION = '0.00_01'; | |||||||||
| 8 | 1 | $VERSION = eval $VERSION; # see L<perlmodstyle> | |||||||||
| 9 | |||||||||||
| 10 | # Preloaded methods go here. | ||||||||||
| 11 | |||||||||||
| 12 | 1 | my $map = { | |||||||||
| 13 | limited => 'need-to-know', | ||||||||||
| 14 | restricted => 'private', | ||||||||||
| 15 | privileged => 'need-to-know', | ||||||||||
| 16 | default => 'private', | ||||||||||
| 17 | }; | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub prepare { | ||||||||
|
Subroutine
prepare: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 20 | 0 | my $class = shift; | |||||||||
| 21 | 0 | my $info = shift; | |||||||||
| 22 | 0 | ▶ | return unless($info->{'restriction'}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 0 | ▶ | return unless(exists($map->{lc($info->{'restriction'})})); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 0 | return(1); | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | sub convert { | ||||||||
|
Subroutine
convert: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 28 | 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 | 1; | |||||||||
| 38 | __END__ | ||||||||||