File Coverage

blib/lib/Enum/Declare/Common/Bool.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Enum::Declare::Common::Bool;
2              
3 2     2   88110 use 5.014;
  2         6  
4 2     2   22 use strict;
  2         3  
  2         50  
5 2     2   6 use warnings;
  2         2  
  2         94  
6              
7 2     2   369 use Enum::Declare;
  2         10778  
  2         514  
8              
9             enum YesNo :Str :Type :Export {
10             Yes = "yes",
11             No = "no"
12             };
13              
14             enum OnOff :Str :Type :Export {
15             On = "on",
16             Off = "off"
17             };
18              
19             enum TrueFalse :Type :Export {
20             True = 1,
21             False = 0
22             };
23              
24             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<< >>
58              
59             =head1 LICENSE AND COPYRIGHT
60              
61             Copyright 2026 LNATION. Artistic License 2.0.
62              
63             =cut