line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package NetApp::Filer::Version; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '500.002'; |
5
|
|
|
|
|
|
|
$VERSION = eval $VERSION; ## no critic: StringyEval |
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
37
|
use strict; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
208
|
|
8
|
7
|
|
|
7
|
|
34
|
use warnings; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
170
|
|
9
|
7
|
|
|
7
|
|
32
|
use Carp; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
364
|
|
10
|
|
|
|
|
|
|
|
11
|
7
|
|
|
7
|
|
39
|
use Class::Std; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
59
|
|
12
|
7
|
|
|
7
|
|
1005
|
use Params::Validate qw( :all ); |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
1244
|
|
13
|
7
|
|
|
7
|
|
40
|
use Data::Dumper; |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
469
|
|
14
|
|
|
|
|
|
|
|
15
|
7
|
|
|
7
|
|
38
|
use overload '""' => 'get_string'; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
64
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
{ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my %string_of :ATTR( get => 'string' ); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my %release_of :ATTR( get => 'release' ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my %major_of :ATTR( get => 'major' ); |
24
|
|
|
|
|
|
|
my %minor_of :ATTR( get => 'minor' ); |
25
|
|
|
|
|
|
|
my %subminor_of :ATTR( get => 'subminor' ); |
26
|
|
|
|
|
|
|
my %patchlevel_of :ATTR( get => 'patchlevel' ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my %date_of :ATTR( get => 'date' ); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub BUILD { |
31
|
|
|
|
|
|
|
|
32
|
3
|
|
|
3
|
0
|
3619
|
my ($self,$ident,$args_ref) = @_; |
33
|
|
|
|
|
|
|
|
34
|
3
|
|
|
|
|
8
|
my @args = %$args_ref; |
35
|
|
|
|
|
|
|
|
36
|
3
|
|
|
|
|
70
|
my (%args) = validate( @args, { |
37
|
|
|
|
|
|
|
string => { type => SCALAR }, |
38
|
|
|
|
|
|
|
}); |
39
|
|
|
|
|
|
|
|
40
|
3
|
|
|
|
|
17
|
$string_of{$ident} = $args{string}; |
41
|
|
|
|
|
|
|
|
42
|
3
|
50
|
|
|
|
25
|
$args{string} =~ |
43
|
|
|
|
|
|
|
m{ NetApp \s+ Release \s+ (\S+) : \s+ (.*) }gmx || |
44
|
|
|
|
|
|
|
croak ("Invalid version string: $args{string}\n"); |
45
|
|
|
|
|
|
|
|
46
|
3
|
|
|
|
|
9
|
$release_of{$ident} = $1; |
47
|
3
|
|
|
|
|
9
|
$date_of{$ident} = $2; |
48
|
|
|
|
|
|
|
|
49
|
3
|
|
|
|
|
29
|
( $major_of{$ident}, $minor_of{$ident}, |
50
|
|
|
|
|
|
|
$subminor_of{$ident}, $patchlevel_of{$ident} ) = |
51
|
|
|
|
|
|
|
split( /[\.L]+/, $release_of{$ident} ); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |