line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ColorTheme::Data::Dump::Color::Default16; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
4
|
|
|
|
|
|
|
our $DATE = '2021-06-24'; # DATE |
5
|
|
|
|
|
|
|
our $DIST = 'Data-Dump-Color'; # DIST |
6
|
|
|
|
|
|
|
our $VERSION = '0.247'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1799
|
use parent 'ColorThemeBase::Static::FromStructColors'; |
|
2
|
|
|
|
|
501
|
|
|
2
|
|
|
|
|
14
|
|
9
|
2
|
|
|
2
|
|
4952
|
use Term::ANSIColor; |
|
2
|
|
|
|
|
14271
|
|
|
2
|
|
|
|
|
467
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub _ansi16 { |
12
|
24
|
|
|
24
|
|
371
|
my ($fg, $bg) = @_; |
13
|
|
|
|
|
|
|
return { |
14
|
24
|
50
|
|
|
|
53
|
(defined $fg ? (ansi_fg=>color($fg)) : ()), |
|
|
100
|
|
|
|
|
|
15
|
|
|
|
|
|
|
(defined $bg ? (ansi_bg=>color($bg)) : ()), |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our %THEME = ( |
20
|
|
|
|
|
|
|
v => 2, |
21
|
|
|
|
|
|
|
items => { |
22
|
|
|
|
|
|
|
Regexp => _ansi16('yellow'), |
23
|
|
|
|
|
|
|
undef => _ansi16('bright_red'), |
24
|
|
|
|
|
|
|
number => _ansi16('bright_blue'), # floats can have different color |
25
|
|
|
|
|
|
|
float => _ansi16('cyan'), |
26
|
|
|
|
|
|
|
string => _ansi16('bright_yellow'), |
27
|
|
|
|
|
|
|
object => _ansi16('bright_green'), |
28
|
|
|
|
|
|
|
glob => _ansi16('bright_cyan'), |
29
|
|
|
|
|
|
|
key => _ansi16('magenta'), |
30
|
|
|
|
|
|
|
comment => _ansi16('green'), |
31
|
|
|
|
|
|
|
keyword => _ansi16('blue'), |
32
|
|
|
|
|
|
|
symbol => _ansi16('cyan'), |
33
|
|
|
|
|
|
|
linum => _ansi16('black', 'on_white'), # file:line number |
34
|
|
|
|
|
|
|
}, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
#use Data::Dump; dd \%THEME; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
# ABSTRACT: Default color theme for Data::Dump::Color (16 color) |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |