File Coverage

blib/lib/Software/Security/Policy.pm
Criterion Covered Total %
statement 6 17 35.2
branch 0 6 0.0
condition n/a
subroutine 2 4 50.0
pod 2 2 100.0
total 10 29 34.4


line stmt bran cond sub pod time code
1 2     2   1226 use strict;
  2         6  
  2         81  
2 2     2   13 use warnings;
  2         5  
  2         777  
3             package Software::Security::Policy;
4             # ABSTRACT: packages that provide templated Security Policys
5              
6             our $VERSION = '0.11'; # VERSION
7              
8              
9             sub name {
10 0     0 1   my ($self) = @_;
11 0 0         my $pkg = ref $self ? ref $self : $self;
12 0           $pkg =~ s/^Software::Security::Policy:://;
13 0           $pkg =~ s/::/ /g;
14 0           return $pkg;
15             }
16              
17              
18             sub version {
19 0     0 1   my ($self) = @_;
20 0 0         my $pkg = ref $self ? ref $self : $self;
21 0           $pkg =~ s/.+:://;
22 0           my (undef, @vparts) = split /_/, $pkg;
23              
24 0 0         return unless @vparts;
25 0           return join '.', @vparts;
26             }
27              
28              
29              
30             1;
31              
32             __END__