File Coverage

blib/lib/Devel/AssertOS/Linux/RHEL.pm
Criterion Covered Total %
statement 17 18 94.4
branch 1 2 50.0
condition 1 3 33.3
subroutine 6 7 85.7
pod n/a
total 25 30 83.3


line stmt bran cond sub pod time code
1             package Devel::AssertOS::Linux::RHEL;
2              
3 2     2   13 use Devel::CheckOS;
  2         4  
  2         156  
4 2     2   10 use strict;
  2         5  
  2         44  
5 2     2   9 use warnings;
  2         4  
  2         115  
6              
7 2     2   11 use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
  2         4  
  2         103  
8              
9 2     2   8 no warnings 'redefine';
  2         3  
  2         290  
10              
11             our $VERSION = '1.0';
12              
13             sub os_is {
14 16     16   96 my $id = distributor_id;
15              
16 16 50 33     94 Devel::CheckOS::os_is('Linux') &&
17             defined($id) &&
18             $id eq 'rhel';
19             }
20              
21 0     0     sub expn { "The Linux distribution is some version of RHEL (Redhat Enterprise)" }
22              
23             Devel::CheckOS::die_unsupported() unless ( os_is() );
24              
25             =head1 COPYRIGHT and LICENCE
26              
27             Copyright 2024 David Cantrell
28              
29             This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
30              
31             =cut
32              
33             1;
34              
35