| 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
Condition100%3/3
Devel::CheckOS::os_is(subtypes()) or $^O =~ /^linux$/i
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
| |||||||||||||||||||||||||||||
| 17 | $^O =~ /^linux$/i | ||||||||||||||||||||||||||||
| 18 | ) ? 1 : 0; | ||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 20 | ▶ | Devel::CheckOS::die_unsupported() unless(os_is()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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; | |||||||||||||||||||||||||||