blib/lib/Devel/AssertOS/Linux/SLES.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 78.1% 25 / 32 CC 3 SCAR 7.0
CC
3
Cov
83%
os_is
3.7
expn
2.0
BEGIN
1.0
CRAP 2.0
« blib/lib/Devel/AssertOS/Linux/Rocky.pm ↑ Summary blib/lib/Devel/AssertOS/Linux/Slackware.pm »
1 package Devel::AssertOS::Linux::SLES;
2  
3 2 ▶use Devel::CheckOS;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 our $VERSION = '1.0';
12  
13 9 ▶sub os_is {
Subroutine os_is: called CC=3 SCAR=13.1
14 9 my $id = distributor_id;
15  
16 9 ▶ Devel::CheckOS::os_is('Linux') &&
Branch: 1 branch
BranchTrueFalseTotal
Devel::CheckOS::os_is("Linux") and defined $id and $id eq "sles" 9 0 9
Condition33%1/3
Devel::CheckOS::os_is("Linux") and defined $id
!ll&&!rl&&r
009
MC/DC0%0/2
Devel::CheckOS::os_is("Linux") and defined $id
Devel::CheckOS::os_is("Linux") defined $id
Truth table33%1/3
A and B
A= Devel::CheckOS::os_is("Linux")B= defined $id
ABresult
0X0
100
111
17 defined($id) &&
18 $id eq 'sles';
19 }
20  
21 0 ▶sub expn { "The Linux distribution is SUSE Linux Enterprise Server" }
Subroutine expn: not called CC=1 SCAR=6.9
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  
« blib/lib/Devel/AssertOS/Linux/Rocky.pm ↑ Summary blib/lib/Devel/AssertOS/Linux/Slackware.pm »