File Coverage

blib/lib/Devel/AssertOS/Linux.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition 3 3 100.0
subroutine 8 8 100.0
pod 0 4 0.0
total 29 33 87.8


line stmt bran cond sub pod time code
1             package Devel::AssertOS::Linux;
2              
3 15     15   7719 use Devel::CheckOS;
  15         35  
  15         951  
4 15     15   76 use strict;
  15         66  
  15         399  
5 15     15   67 use warnings;
  15         28  
  15         907  
6 15     15   95 no warnings 'redefine';
  15         26  
  15         3132  
7              
8             our $VERSION = '1.3';
9              
10 206     206 0 1154 sub subtypes { qw(Android) }
11 2     2 0 8 sub matches { ('Linux', subtypes()) }
12              
13             sub os_is {
14             (
15             # order is important
16 204 100 100 204 0 825 Devel::CheckOS::os_is(subtypes()) ||
17             $^O =~ /^linux$/i
18             ) ? 1 : 0;
19             }
20              
21             Devel::CheckOS::die_unsupported() unless(os_is());
22              
23             sub expn {
24 1     1 0 90 "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             1;