File Coverage

lib/Rex/Inventory/DMIDecode/CPU.pm
Criterion Covered Total %
statement 16 20 80.0
branch n/a
condition 1 3 33.3
subroutine 5 7 71.4
pod 0 3 0.0
total 22 33 66.6


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Inventory::DMIDecode::CPU;
6              
7 39     39   556 use v5.12.5;
  39         143  
8 39     39   212 use warnings;
  39         92  
  39         1620  
9              
10             our $VERSION = '1.14.3'; # VERSION
11              
12 39     39   234 use Rex::Inventory::DMIDecode::Section;
  39         87  
  39         2199  
13 39     39   272 use base qw(Rex::Inventory::DMIDecode::Section);
  39         100  
  39         9292  
14              
15             __PACKAGE__->section("Processor Information");
16              
17             __PACKAGE__->has(
18             [
19             'Max Speed', 'Serial Number', 'Family', 'Core Enabled',
20             'Version', 'Status', 'Upgrade', 'Thread Count',
21             ],
22             1
23             ); # is_array 1
24              
25             sub new {
26 3     3 0 7 my $that = shift;
27 3   33     12 my $proto = ref($that) || $that;
28 3         13 my $self = $that->SUPER::new(@_);
29              
30 3         6 bless( $self, $proto );
31              
32 3         7 return $self;
33             }
34              
35             sub num_cores {
36 0     0 0   my ($self) = @_;
37 0           return $self->get_core_enabled;
38             }
39              
40             sub get_socket_type {
41 0     0 0   my ($self) = @_;
42 0           return $self->get_upgrade;
43             }
44              
45             1;