File Coverage

blib/lib/Data/Printer/Theme/Material.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 11 12 91.6


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 31     31   228 use strict;
  31         65  
  31         936  
5 31     31   158 use warnings;
  31         92  
  31         6303  
6              
7             sub colors {
8 258     258 0 1988 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 258         3948 };
51             }
52              
53             1;
54             __END__