blib/lib/Devel/AssertOS/Linux.pm

filter: Statementstmt 100% 19 / 19 Branchbran 75.0% 3 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 4 totaltotal 87.5% 35 / 40 CC 3 SCAR 4.7
CC
3
Cov
96%
os_is
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
« blib/lib/Devel/AssertOS/BeOS.pm ↑ Summary blib/lib/Devel/CheckOS.pm »
1 package Devel::AssertOS::Linux;
2  
3 21 ▶use Devel::CheckOS;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 21 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 21 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 21 ▶no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 20 our $VERSION = '1.3';
9  
10 220 ▶sub subtypes { qw(Android) }
Subroutine subtypes: called CC=1 SCAR=0.0
Pod undocumented
11 2 ▶sub matches { ('Linux', subtypes()) }
Subroutine matches: called CC=1 SCAR=0.0
Pod undocumented
12  
13 218 ▶sub os_is {
Subroutine os_is: called CC=3 SCAR=11.0
Pod undocumented
14 (
15 # order is important
16 218 ▶ Devel::CheckOS::os_is(subtypes()) ||
Branch: 1 branch
BranchTrueFalseTotal
Devel::CheckOS::os_is(subtypes()) || $^O =~ /^linux$/i ? : 217 1 218
Condition100%3/3
Devel::CheckOS::os_is(subtypes()) or $^O =~ /^linux$/i
l!l&&r!l&&!r
32141
MC/DC100%2/2
Devel::CheckOS::os_is(subtypes()) or $^O =~ /^linux$/i
Devel::CheckOS::os_is(subtypes()) $^O =~ /^linux$/i
Truth table100%3/3
A or B
A= Devel::CheckOS::os_is(subtypes())B= $^O =~ /^linux$/i
ABresult
1X1
011
000
17 $^O =~ /^linux$/i
18 ) ? 1 : 0;
19 }
20  
21 20 ▶Devel::CheckOS::die_unsupported() unless(os_is());
Branch: 1 branch
BranchTrueFalseTotal
unless os_is() 0 20 20
22  
23 1 ▶sub expn {
Subroutine expn: called CC=1 SCAR=0.0
Pod undocumented
24 1 "The operating system has a Linux kernel"
25 }
26  
27 =head1 COPYRIGHT and LICENCE
28  
29 Copyright 2024 David Cantrell
30  
31 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.
32  
33 =cut
34  
35 20 1;
« blib/lib/Devel/AssertOS/BeOS.pm ↑ Summary blib/lib/Devel/CheckOS.pm »