| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Enum::Declare::Common::LogLevel; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
116539
|
use 5.014; |
|
|
2
|
|
|
|
|
7
|
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
|
2
|
|
|
|
|
20
|
|
|
|
2
|
|
|
|
|
64
|
|
|
5
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
93
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
480
|
use Enum::Declare; |
|
|
2
|
|
|
|
|
13940
|
|
|
|
2
|
|
|
|
|
279
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
enum Level :Type :Export { |
|
10
|
|
|
|
|
|
|
Trace = 0, |
|
11
|
|
|
|
|
|
|
Debug = 1, |
|
12
|
|
|
|
|
|
|
Info = 2, |
|
13
|
|
|
|
|
|
|
Warn = 3, |
|
14
|
|
|
|
|
|
|
Error = 4, |
|
15
|
|
|
|
|
|
|
Fatal = 5 |
|
16
|
|
|
|
|
|
|
}; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Enum::Declare::Common::LogLevel - Numeric log levels for comparison |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
use Enum::Declare::Common::LogLevel; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
say Trace; # 0 |
|
29
|
|
|
|
|
|
|
say Fatal; # 5 |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Filter by level |
|
32
|
|
|
|
|
|
|
log($msg) if $level >= Warn; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 ENUMS |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 Level :Export |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Trace=0, Debug=1, Info=2, Warn=3, Error=4, Fatal=5. |
|
39
|
|
|
|
|
|
|
Integer values support numeric comparison. |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 AUTHOR |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
LNATION C<< >> |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Copyright 2026 LNATION. Artistic License 2.0. |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |