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

filter: Statementstmt 95.2% 20 / 21 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 2 totaltotal 74.3% 29 / 39 CC 3 SCAR 7.0
CC
3
Cov
82%
os_is
3.7
expn
2.0
BEGIN
1.0
CRAP 2.0
« blib/lib/Devel/AssertOS/Linux/UnknownDebianLike.pm ↑ Summary blib/lib/Devel/AssertOS/Linux/Alma.pm »
1 package Devel::AssertOS::Linux::Ubuntu;
2  
3 5 ▶use Devel::CheckOS;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 ▶use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 ▶no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 5 our $VERSION = '1.2';
12  
13 16 ▶sub os_is {
Subroutine os_is: called CC=3 SCAR=13.1
Pod undocumented
14 16 my $id = distributor_id;
15 16 ▶ Devel::CheckOS::os_is('Linux') && defined($id) && $id eq 'ubuntu';
Branch: 1 branch
BranchTrueFalseTotal
Devel::CheckOS::os_is("Linux") and defined $id and $id eq "ubuntu" 16 0 16
Condition33%1/3
Devel::CheckOS::os_is("Linux") and defined $id
!ll&&!rl&&r
0016
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 }
17  
18 0 ▶sub expn { "The Linux distribution is some version of Ubuntu" }
Subroutine expn: not called CC=1 SCAR=6.9
Pod undocumented
19  
20 5 ▶Devel::CheckOS::die_unsupported() unless ( os_is() );
Branch: 1 branch
BranchTrueFalseTotal
unless os_is() 0 5 5
21  
22 =head1 COPYRIGHT and LICENCE
23  
24 Copyright 2024 David Cantrell
25  
26 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.
27  
28 =cut
29  
30 5 1;
31  
« blib/lib/Devel/AssertOS/Linux/UnknownDebianLike.pm ↑ Summary blib/lib/Devel/AssertOS/Linux/Alma.pm »