line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Printer::Theme::Material; |
2
|
|
|
|
|
|
|
# inspired by Mattia Astorino's Material theme: |
3
|
|
|
|
|
|
|
# https://github.com/equinusocio/vsc-material-theme |
4
|
30
|
|
|
30
|
|
217
|
use strict; |
|
30
|
|
|
|
|
917
|
|
|
30
|
|
|
|
|
959
|
|
5
|
30
|
|
|
30
|
|
152
|
use warnings; |
|
30
|
|
|
|
|
78
|
|
|
30
|
|
|
|
|
5121
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub colors { |
8
|
256
|
|
|
256
|
0
|
2359
|
my %code_for = ( |
9
|
|
|
|
|
|
|
'very_light_gray' => '#EEFFFF', |
10
|
|
|
|
|
|
|
'light_gray' => '#A1BBC5', |
11
|
|
|
|
|
|
|
'gray' => '#4f5a61', |
12
|
|
|
|
|
|
|
'green' => '#90B55A', #'#C3E88D', |
13
|
|
|
|
|
|
|
'teal' => '#009688', |
14
|
|
|
|
|
|
|
'light_teal' => '#73d1c8', |
15
|
|
|
|
|
|
|
'cyan' => '#66D9EF', |
16
|
|
|
|
|
|
|
'blue' => '#82AAFF', |
17
|
|
|
|
|
|
|
'indigo' => '#7986CB', |
18
|
|
|
|
|
|
|
'purple' => '#C792EA', |
19
|
|
|
|
|
|
|
'pink' => '#FF5370', |
20
|
|
|
|
|
|
|
'red' => '#F07178', |
21
|
|
|
|
|
|
|
'strong_orange' => '#F78C6A', |
22
|
|
|
|
|
|
|
'orange' => '#FFCB6B', |
23
|
|
|
|
|
|
|
'light_orange' => '#FFE082', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
return { |
27
|
|
|
|
|
|
|
array => $code_for{light_gray}, # array index numbers |
28
|
|
|
|
|
|
|
number => $code_for{strong_orange}, # numbers |
29
|
|
|
|
|
|
|
string => $code_for{green}, # (or 'very_light_gray'?) # strings |
30
|
|
|
|
|
|
|
class => $code_for{purple}, # class names |
31
|
|
|
|
|
|
|
method => $code_for{blue}, # method names |
32
|
|
|
|
|
|
|
undef => $code_for{pink}, # the 'undef' value |
33
|
|
|
|
|
|
|
hash => $code_for{indigo}, # hash keys |
34
|
|
|
|
|
|
|
regex => $code_for{orange}, # regular expressions |
35
|
|
|
|
|
|
|
code => $code_for{gray}, # code references |
36
|
|
|
|
|
|
|
glob => $code_for{strong_orange}, # globs (usually file handles) |
37
|
|
|
|
|
|
|
vstring => $code_for{strong_orange}, # version strings (v5.16.0, etc) |
38
|
|
|
|
|
|
|
lvalue => $code_for{strong_orange}, # lvalue label |
39
|
|
|
|
|
|
|
format => $code_for{strong_orange}, # format type |
40
|
|
|
|
|
|
|
repeated => $code_for{red}, # references to seen values |
41
|
|
|
|
|
|
|
caller_info => $code_for{gray}, # details on what's being printed |
42
|
|
|
|
|
|
|
weak => $code_for{green}, # weak references flag |
43
|
|
|
|
|
|
|
tainted => $code_for{light_orange}, # tainted flag |
44
|
|
|
|
|
|
|
unicode => $code_for{light_orange}, # utf8 flag |
45
|
|
|
|
|
|
|
escaped => $code_for{teal}, # escaped characters (\t, \n, etc) |
46
|
|
|
|
|
|
|
brackets => $code_for{cyan}, # (), {}, [] |
47
|
|
|
|
|
|
|
separator => $code_for{cyan}, # the "," between hash pairs, array elements, etc |
48
|
|
|
|
|
|
|
quotes => $code_for{cyan}, |
49
|
|
|
|
|
|
|
unknown => $code_for{red}, # any (potential) data type unknown to Data::Printer |
50
|
256
|
|
|
|
|
4041
|
}; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
__END__ |