line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package NetApp::Aggregate::RAIDGroup; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '500.002'; |
5
|
|
|
|
|
|
|
$VERSION = eval $VERSION; ## no critic: StringyEval |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
9
|
1
|
|
|
1
|
|
5
|
use English; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
10
|
1
|
|
|
1
|
|
535
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
75
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
6
|
use Class::Std; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
13
|
1
|
|
|
1
|
|
120
|
use Params::Validate qw( :all ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
192
|
|
14
|
1
|
|
|
1
|
|
6
|
use Regexp::Common; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my %name_of :ATTR( get => 'name' ); |
19
|
|
|
|
|
|
|
my %state_of :ATTR; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub BUILD { |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
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
|
|
|
|
|
|
|
sub get_states { |
37
|
0
|
|
|
0
|
1
|
|
return keys %{ $state_of{ident shift} }; |
|
0
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub get_state { |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
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; |