line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Inventory::DMIDecode::Memory; |
6
|
|
|
|
|
|
|
|
7
|
39
|
|
|
39
|
|
573
|
use v5.12.5; |
|
39
|
|
|
|
|
138
|
|
8
|
39
|
|
|
39
|
|
201
|
use warnings; |
|
39
|
|
|
|
|
107
|
|
|
39
|
|
|
|
|
1793
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.2'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
39
|
|
|
39
|
|
288
|
use Rex::Inventory::DMIDecode::Section; |
|
39
|
|
|
|
|
96
|
|
|
39
|
|
|
|
|
2114
|
|
13
|
39
|
|
|
39
|
|
285
|
use base qw(Rex::Inventory::DMIDecode::Section); |
|
39
|
|
|
|
|
126
|
|
|
39
|
|
|
|
|
10162
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__PACKAGE__->section("Memory Device"); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__PACKAGE__->has( |
18
|
|
|
|
|
|
|
[ |
19
|
|
|
|
|
|
|
'Part Number', 'Serial Number', 'Type', 'Speed', |
20
|
|
|
|
|
|
|
'Size', 'Manufacturer', 'Bank Locator', 'Form Factor', |
21
|
|
|
|
|
|
|
'Locator', |
22
|
|
|
|
|
|
|
], |
23
|
|
|
|
|
|
|
1 |
24
|
|
|
|
|
|
|
); # is_array 1 |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new { |
27
|
3
|
|
|
3
|
0
|
4
|
my $that = shift; |
28
|
3
|
|
33
|
|
|
10
|
my $proto = ref($that) || $that; |
29
|
3
|
|
|
|
|
10
|
my $self = $that->SUPER::new(@_); |
30
|
|
|
|
|
|
|
|
31
|
3
|
|
|
|
|
4
|
bless( $self, $proto ); |
32
|
|
|
|
|
|
|
|
33
|
3
|
|
|
|
|
6
|
return $self; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub get { |
37
|
|
|
|
|
|
|
|
38
|
3
|
|
|
3
|
0
|
8
|
my ( $self, $key, $is_array ) = @_; |
39
|
3
|
50
|
|
|
|
11
|
if ( $key eq "Type" ) { |
40
|
0
|
|
|
|
|
0
|
my $ret = $self->_search_for( $key, $is_array ); |
41
|
0
|
0
|
|
|
|
0
|
if ( $ret eq "" ) { |
42
|
0
|
|
|
|
|
0
|
return ""; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
0
|
return $ret; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
3
|
|
|
|
|
26
|
return $self->SUPER::get( $key, $is_array ); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |