Common/Priority.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Common/Permission.pm ↑ Summary Common/Sort.pm »
1 package Enum::Declare::Common::Priority;
2  
3 1 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Enum::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 enum Level :Type :Export {
10 Lowest = 1,
11 Low = 2,
12 Medium = 3,
13 High = 4,
14 Highest = 5
15 1 };
16  
17 enum Severity :Str :Type :Export {
18 Debug = "debug",
19 Info = "info",
20 Warning = "warning",
21 Error = "error",
22 Critical = "critical"
23 1 };
24  
25 1 1;
26  
27 =head1 NAME
28  
29 Enum::Declare::Common::Priority - Priority levels and severity strings
30  
31 =head1 SYNOPSIS
32  
33 use Enum::Declare::Common::Priority;
34  
35 say Medium; # 3
36 say Highest; # 5
37 say Critical; # "critical"
38 say Debug; # "debug"
39  
40 # Compare levels numerically
41 if ($priority >= High) { ... }
42  
43 =head1 ENUMS
44  
45 =head2 Level :Export
46  
47 Lowest=1, Low=2, Medium=3, High=4, Highest=5.
48  
49 =head2 Severity :Str :Export
50  
51 Debug="debug", Info="info", Warning="warning", Error="error",
52 Critical="critical".
53  
54 =head1 AUTHOR
55  
56 LNATION C<< <email@lnation.org> >>
57  
58 =head1 LICENSE AND COPYRIGHT
59  
60 Copyright 2026 LNATION. Artistic License 2.0.
61  
62 =cut
« Common/Permission.pm ↑ Summary Common/Sort.pm »