File Coverage

blib/lib/Devel/AssertOS/Linux/Redhat.pm
Criterion Covered Total %
statement 19 19 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 27 27 100.0


line stmt bran cond sub pod time code
1             package Devel::AssertOS::Linux::Redhat;
2              
3 2     2   13 use Devel::CheckOS;
  2         5  
  2         119  
4 2     2   11 use strict;
  2         3  
  2         43  
5 2     2   6 use warnings;
  2         3  
  2         165  
6              
7 2     2   11 use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
  2         3  
  2         127  
8              
9 2     2   8 no warnings 'redefine';
  2         4  
  2         382  
10              
11             our $VERSION = '1.0';
12              
13 9     9   24 sub matches { map { "Linux::$_" } qw(Centos Fedora Alma Rocky RHEL Oracle) }
  54         143  
14              
15 8     8   28 sub os_is { Devel::CheckOS::os_is(matches()) }
16              
17 1     1   107 sub expn { "The Linux distribution is some derivative of Redhat - which includes RHEL, Centos, Fedora, and others" }
18              
19             Devel::CheckOS::die_unsupported() unless ( os_is() );
20              
21             =head1 COPYRIGHT and LICENCE
22              
23             Copyright 2024 David Cantrell
24              
25             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.
26              
27             =cut
28              
29             1;
30              
31