File Coverage

blib/lib/Devel/AssertOS/Linux/SLES.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::SLES;
2              
3 2     2   15 use Devel::CheckOS;
  2         5  
  2         141  
4 2     2   12 use strict;
  2         5  
  2         55  
5 2     2   10 use warnings;
  2         4  
  2         138  
6              
7 2     2   12 use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
  2         4  
  2         126  
8              
9 2     2   11 no warnings 'redefine';
  2         5  
  2         366  
10              
11             our $VERSION = '1.0';
12              
13             sub os_is {
14 9     9   50 my $id = distributor_id;
15              
16 9 50 33     56 Devel::CheckOS::os_is('Linux') &&
17             defined($id) &&
18             $id eq 'sles';
19             }
20              
21 0     0     sub expn { "The Linux distribution is SUSE Linux Enterprise Server" }
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