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 12     12   1968 use Devel::CheckOS;
  12         35  
  12         614  
4 12     12   82 use strict;
  12         27  
  12         289  
5 12     12   89 use warnings;
  12         28  
  12         452  
6 12     12   70 no warnings 'redefine';
  12         31  
  12         2318  
7              
8             our $VERSION = '1.3';
9              
10 54     54 0 328 sub subtypes { qw(Android) }
11 2     2 0 11 sub matches { ('Linux', subtypes()) }
12              
13             sub os_is {
14             (
15             # order is important
16 52 100 100 52 0 228 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 83 "The operating system has a Linux kernel"
25             }
26              
27             =head1 COPYRIGHT and LICENCE
28              
29             Copyright 2023 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;