File Coverage

blib/lib/Devel/AssertOS/Linux/UnknownDebianLike.pm
Criterion Covered Total %
statement 14 15 93.3
branch 1 2 50.0
condition 1 3 33.3
subroutine 5 6 83.3
pod n/a
total 21 26 80.7


line stmt bran cond sub pod time code
1             package Devel::AssertOS::Linux::UnknownDebianLike;
2              
3 3     3   21 use Devel::CheckOS;
  3         8  
  3         195  
4 3     3   16 use strict;
  3         6  
  3         76  
5 3     3   14 use warnings;
  3         5  
  3         189  
6 3     3   16 no warnings 'redefine';
  3         6  
  3         657  
7              
8             our $VERSION = '1.0';
9              
10             # Can't use() this because that would make an infinite loop at BEGIN-time
11             if(!exists($INC{'Devel/AssertOS/Linux/Debian.pm'})) {
12             require Devel::AssertOS::Linux::Debian;
13             }
14              
15             sub os_is {
16             Devel::CheckOS::os_is('Linux') &&
17             -f '/etc/debian_version' &&
18 5 50 33 5   40 Devel::CheckOS::os_isnt(grep { $_ !~ /UnknownDebianLike/ } Devel::AssertOS::Linux::Debian::matches())
  30         79  
19             }
20              
21 0     0     sub expn { "The Linux distribution is some derivative of Debian that we don't know any more details about, or possibly a very old version of real Debian" }
22              
23             Devel::CheckOS::die_unsupported() unless(os_is());
24              
25             =head1 COPYRIGHT and LICENCE
26              
27             Copyright 2024 David Cantrell
28              
29             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.
30              
31             =cut
32              
33             1;
34