line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pcore::Core::Const; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
25
|
use common::header; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
105
|
|
4
|
5
|
|
|
5
|
|
1316
|
use Const::Fast qw[const]; |
|
5
|
|
|
|
|
9691
|
|
|
5
|
|
|
|
|
31
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# <<< |
7
|
|
|
|
|
|
|
const our $ANSI => { |
8
|
|
|
|
|
|
|
RESET => 0, |
9
|
|
|
|
|
|
|
BOLD => 1, |
10
|
|
|
|
|
|
|
DARK => 2, |
11
|
|
|
|
|
|
|
ITALIC => 3, |
12
|
|
|
|
|
|
|
UNDERLINE => 4, |
13
|
|
|
|
|
|
|
BLINK => 5, |
14
|
|
|
|
|
|
|
REVERSE => 7, |
15
|
|
|
|
|
|
|
CONCEALED => 8, |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
BLACK => 30, ON_BLACK => 40, |
18
|
|
|
|
|
|
|
RED => 31, ON_RED => 41, |
19
|
|
|
|
|
|
|
GREEN => 32, ON_GREEN => 42, |
20
|
|
|
|
|
|
|
YELLOW => 33, ON_YELLOW => 43, |
21
|
|
|
|
|
|
|
BLUE => 34, ON_BLUE => 44, |
22
|
|
|
|
|
|
|
MAGENTA => 35, ON_MAGENTA => 45, |
23
|
|
|
|
|
|
|
CYAN => 36, ON_CYAN => 46, |
24
|
|
|
|
|
|
|
WHITE => 37, ON_WHITE => 47, |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
BRIGHT_BLACK => 90, ON_BRIGHT_BLACK => 100, |
27
|
|
|
|
|
|
|
BRIGHT_RED => 91, ON_BRIGHT_RED => 101, |
28
|
|
|
|
|
|
|
BRIGHT_GREEN => 92, ON_BRIGHT_GREEN => 102, |
29
|
|
|
|
|
|
|
BRIGHT_YELLOW => 93, ON_BRIGHT_YELLOW => 103, |
30
|
|
|
|
|
|
|
BRIGHT_BLUE => 94, ON_BRIGHT_BLUE => 104, |
31
|
|
|
|
|
|
|
BRIGHT_MAGENTA => 95, ON_BRIGHT_MAGENTA => 105, |
32
|
|
|
|
|
|
|
BRIGHT_CYAN => 96, ON_BRIGHT_CYAN => 106, |
33
|
|
|
|
|
|
|
BRIGHT_WHITE => 97, ON_BRIGHT_WHITE => 107, |
34
|
|
|
|
|
|
|
}; |
35
|
|
|
|
|
|
|
# >>> |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
for my $name ( keys $ANSI->%* ) { |
38
|
|
|
|
|
|
|
eval qq[const our \$$name => "\e\[$ANSI->{$name}m"]; ## no critic qw[BuiltinFunctions::ProhibitStringyEval] |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
require Pcore::Core::Exporter; |
42
|
|
|
|
|
|
|
Pcore::Core::Exporter->import( |
43
|
|
|
|
|
|
|
-export => { |
44
|
|
|
|
|
|
|
CORE => [qw[$MSWIN $CRLF $LF $STDOUT_UTF8 $STDERR_UTF8]], |
45
|
|
|
|
|
|
|
DEFAULT => [':CORE'], |
46
|
|
|
|
|
|
|
ANSI => [ map { '$' . $_ } keys $ANSI->%* ], |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
our $STDOUT_UTF8; |
51
|
|
|
|
|
|
|
our $STDERR_UTF8; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
const our $MSWIN => $^O =~ /MSWin/sm ? 1 : 0; |
54
|
|
|
|
|
|
|
const our $CRLF => qq[\x0D\x0A]; ## no critic qw[ValuesAndExpressions::ProhibitEscapedCharacters] |
55
|
|
|
|
|
|
|
const our $LF => qq[\x0A]; ## no critic qw[ValuesAndExpressions::ProhibitEscapedCharacters] |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
## -----SOURCE FILTER LOG BEGIN----- |
59
|
|
|
|
|
|
|
## |
60
|
|
|
|
|
|
|
## PerlCritic profile "common" policy violations: |
61
|
|
|
|
|
|
|
## +------+----------------------+----------------------------------------------------------------------------------------------------------------+ |
62
|
|
|
|
|
|
|
## | Sev. | Lines | Policy | |
63
|
|
|
|
|
|
|
## |======+======================+================================================================================================================| |
64
|
|
|
|
|
|
|
## | 3 | 38 | ErrorHandling::RequireCheckingReturnValueOfEval - Return value of eval not tested | |
65
|
|
|
|
|
|
|
## |------+----------------------+----------------------------------------------------------------------------------------------------------------| |
66
|
|
|
|
|
|
|
## | 2 | 1 | Modules::RequireVersionVar - No package-scoped "$VERSION" variable found | |
67
|
|
|
|
|
|
|
## +------+----------------------+----------------------------------------------------------------------------------------------------------------+ |
68
|
|
|
|
|
|
|
## |
69
|
|
|
|
|
|
|
## -----SOURCE FILTER LOG END----- |
70
|
|
|
|
|
|
|
__END__ |
71
|
|
|
|
|
|
|
=pod |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=encoding utf8 |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 NAME |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Pcore::Core::Const |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SYNOPSIS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 DESCRIPTION |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |