NetApp/Aggregate/RAIDGroup.pm

filter: Statementstmt 71.0% 27 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.0% 7 / 10 Podpod 66.6% 2 / 3 totaltotal 70.5% 36 / 51 CC 1 SCAR 2.6
CC
1
Cov
71%
BUILD
2.0
get_states
2.0
get_state
2.0
CRAP 1.3
« NetApp.pm ↑ Summary NetApp/Filer/Version.pm »
1  
2 package NetApp::Aggregate::RAIDGroup;
3  
4 1 our $VERSION = '500.002';
5 1 $VERSION = eval $VERSION; ## no critic: StringyEval
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use English;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use Class::Std;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Params::Validate qw( :all );
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Regexp::Common;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 {
17  
18 1 my %name_of :ATTR( get => 'name' );
19 1 my %state_of :ATTR;
20  
21 0 ▶ sub BUILD {
Subroutine BUILD: not called CC=1 SCAR=6.9
Pod undocumented
22  
23 0 my ($self,$ident,$args_ref) = @_;
24  
25 0 my @args = %$args_ref;
26  
27 0 my (%args) = validate( @args, {
28 name => { type => SCALAR },
29 state => { type => HASHREF },
30 });
31  
32 0 $name_of{$ident} = $args{name};
33 0 $state_of{$ident} = $args{state};
34 }
35  
36 0 ▶ sub get_states {
Subroutine get_states: not called CC=1 SCAR=6.9
Pod documented
37 0 return keys %{ $state_of{ident shift} };
38 }
39  
40 0 ▶ sub get_state {
Subroutine get_state: not called CC=1 SCAR=6.9
Pod documented
41
42 0 my $self = shift;
43 0 my $ident = ident $self;
44 0 my $state = shift;
45  
46 0 return $state_of{$ident}->{$state};
47  
48 }
49  
50 }
51  
52 1 1;
« NetApp.pm ↑ Summary NetApp/Filer/Version.pm »