blib/lib/Devel/AssertOS/BeOS.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 30 / 30 CC 3 SCAR 5.1
CC
3
Cov
100%
os_is
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« blib/lib/Devel/AssertOS/Linux/Slackware.pm ↑ Summary blib/lib/Devel/AssertOS/Linux.pm »
1 package Devel::AssertOS::BeOS;
2  
3 7 ▶use Devel::CheckOS;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 ▶no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 our $VERSION = '1.4';
9  
10 # weird special case, not quite like other OS modules, as this is both
11 # an OS *and* a family - maybe this should be fixed at some point
12 2 ▶sub matches { return qw(Haiku) }
Subroutine matches: called CC=1 SCAR=0.0
13 10 ▶sub os_is {
Subroutine os_is: called CC=3 SCAR=11.0
14 10 ▶ return 1 if(
Branch: 1 branch
BranchTrueFalseTotal
if $^O =~ /^beos$/i or Devel::CheckOS::os_is("Haiku") 2 8 10
Condition100%3/3
$^O =~ /^beos$/i or Devel::CheckOS::os_is("Haiku")
l!l&&r!l&&!r
118
MC/DC100%2/2
$^O =~ /^beos$/i or Devel::CheckOS::os_is("Haiku")
$^O =~ /^beos$/i Devel::CheckOS::os_is("Haiku")
Truth table100%3/3
A or B
A= $^O =~ /^beos$/iB= Devel::CheckOS::os_is("Haiku")
ABresult
1X1
011
000
15 $^O =~ /^beos$/i ||
16 Devel::CheckOS::os_is('Haiku')
17 );
18 8 return 0;
19 }
20  
21 1 ▶sub expn {
Subroutine expn: called CC=1 SCAR=0.0
22 1 join("\n",
23 "This matches both Be Inc's original BeOS, as well as Haiku, an open-",
24 "source BeOS-compatible project. This is because Haiku is intended",
25 "to be able to run BeOS software, while also having its own extra features."
26 )
27 }
28  
29 Devel::CheckOS::die_unsupported() unless(os_is());
30  
31 =head1 COPYRIGHT and LICENCE
32  
33 Copyright 2024 David Cantrell
34  
35 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.
36  
37 =cut
38  
39 1;
« blib/lib/Devel/AssertOS/Linux/Slackware.pm ↑ Summary blib/lib/Devel/AssertOS/Linux.pm »