File Coverage

lib/Rex/Inventory/Bios.pm
Criterion Covered Total %
statement 19 20 95.0
branch 1 2 50.0
condition n/a
subroutine 7 7 100.0
pod 0 1 0.0
total 27 30 90.0


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Inventory::Bios;
6              
7 38     38   575 use v5.12.5;
  38         161  
8 38     38   205 use warnings;
  38         94  
  38         1656  
9              
10             our $VERSION = '1.14.2.3'; # TRIAL VERSION
11              
12 38     38   240 use Rex::Hardware::Host;
  38         88  
  38         585  
13 38     38   1064 use Rex::Logger;
  38         93  
  38         323  
14              
15 38     38   1480 use Rex::Inventory::SMBios;
  38         125  
  38         427  
16 38     38   1401 use Rex::Inventory::DMIDecode;
  38         95  
  38         443  
17              
18             sub get {
19              
20 51 50   51 0 276 if ( Rex::Hardware::Host::get_operating_system() eq "SunOS" ) {
21 0         0 return Rex::Inventory::SMBios->new;
22             }
23             else {
24 51         1983 return Rex::Inventory::DMIDecode->new;
25             }
26              
27             }
28              
29             1;