Common/Bool.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Common.pm ↑ Summary Common/Calendar.pm »
1 package Enum::Declare::Common::Bool;
2  
3 2 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use Enum::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 enum YesNo :Str :Type :Export {
10 Yes = "yes",
11 No = "no"
12 2 };
13  
14 enum OnOff :Str :Type :Export {
15 On = "on",
16 Off = "off"
17 2 };
18  
19 enum TrueFalse :Type :Export {
20 True = 1,
21 False = 0
22 2 };
23  
24 2 1;
25  
26 =head1 NAME
27  
28 Enum::Declare::Common::Bool - Boolean enum variants
29  
30 =head1 SYNOPSIS
31  
32 use Enum::Declare::Common::Bool;
33  
34 say Yes; # "yes"
35 say On; # "on"
36 say True; # 1
37 say False; # 0
38 say Zero; # 0
39 say One; # 1
40  
41 =head1 ENUMS
42  
43 =head2 YesNo :Str :Export
44  
45 Yes="yes", No="no".
46  
47 =head2 OnOff :Str :Export
48  
49 On="on", Off="off".
50  
51 =head2 TrueFalse :Export
52  
53 True=1, False=0.
54  
55 =head1 AUTHOR
56  
57 LNATION C<< <email@lnation.org> >>
58  
59 =head1 LICENSE AND COPYRIGHT
60  
61 Copyright 2026 LNATION. Artistic License 2.0.
62  
63 =cut
« Common.pm ↑ Summary Common/Calendar.pm »