blib/lib/Devel/AssertOS/Linux/Elementary.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/Devuan.pm ↑ Summary blib/lib/Devel/AssertOS/Linux/Fedora.pm »
1 package Devel::AssertOS::Linux::Elementary;
2  
3 3 ▶use Devel::CheckOS;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 ▶use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 our $VERSION = '1.1';
11  
12 10 ▶sub os_is {
Subroutine os_is: called CC=3 SCAR=13.1
13 10 my $id = distributor_id;
14  
15 10 ▶ Devel::CheckOS::os_is('Linux') &&
Branch: 1 branch
BranchTrueFalseTotal
Devel::CheckOS::os_is("Linux") and defined $id and $id eq "elementary" 10 0 10
Condition33%1/3
Devel::CheckOS::os_is("Linux") and defined $id
!ll&&!rl&&r
0010
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
16 defined($id) &&
17 $id eq 'elementary';
18 }
19  
20 0 ▶sub expn { "The operating system is Elementary" }
Subroutine expn: not called CC=1 SCAR=6.9
21  
22 Devel::CheckOS::die_unsupported() unless(os_is());
23  
24 =head1 COPYRIGHT and LICENCE
25  
26 Copyright 2024 David Cantrell
27  
28 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.
29  
30 =cut
31  
32 1;
33  
« blib/lib/Devel/AssertOS/Linux/Devuan.pm ↑ Summary blib/lib/Devel/AssertOS/Linux/Fedora.pm »