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   518 use v5.12.5;
  38         137  
8 38     38   224 use warnings;
  38         76  
  38         1668  
9              
10             our $VERSION = '1.14.2.2'; # TRIAL VERSION
11              
12 38     38   244 use Rex::Hardware::Host;
  38         97  
  38         532  
13 38     38   1038 use Rex::Logger;
  38         76  
  38         307  
14              
15 38     38   1256 use Rex::Inventory::SMBios;
  38         94  
  38         452  
16 38     38   1469 use Rex::Inventory::DMIDecode;
  38         127  
  38         453  
17              
18             sub get {
19              
20 51 50   51 0 264 if ( Rex::Hardware::Host::get_operating_system() eq "SunOS" ) {
21 0         0 return Rex::Inventory::SMBios->new;
22             }
23             else {
24 51         2171 return Rex::Inventory::DMIDecode->new;
25             }
26              
27             }
28              
29             1;