| 1 | package Data::Printer::Theme::Monokai; | ||
| 2 | # inspired by Wimer Hazenberg's Monokai theme: monokai.nl | ||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | ▶ | sub colors { |
|
Subroutine
colors: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 7 | 3 | my %code_for = ( | |
| 8 | grey => '#75715E', | ||
| 9 | yellow => '#E6DB74', | ||
| 10 | violet => '#AE81FF', | ||
| 11 | pink => '#F92672', | ||
| 12 | cyan => '#66D9EF', | ||
| 13 | green => '#A6E22E', | ||
| 14 | orange => '#FD971F', | ||
| 15 | empty => '', | ||
| 16 | ); | ||
| 17 | return { | ||
| 18 | array => $code_for{orange}, # array index numbers | ||
| 19 | number => $code_for{violet}, # numbers | ||
| 20 | string => $code_for{yellow}, # (or 'very_light_gray'?) # strings | ||
| 21 | class => $code_for{green}, # class names | ||
| 22 | method => $code_for{green}, # method names | ||
| 23 | undef => $code_for{pink}, # the 'undef' value | ||
| 24 | hash => $code_for{cyan}, # hash keys | ||
| 25 | regex => $code_for{green}, # regular expressions | ||
| 26 | code => $code_for{orange}, # code references | ||
| 27 | glob => $code_for{violet}, # globs (usually file handles) | ||
| 28 | vstring => $code_for{cyan}, # version strings (v5.16.0, etc) | ||
| 29 | lvalue => $code_for{green}, # lvalue label | ||
| 30 | format => $code_for{violet}, # format type | ||
| 31 | true => $code_for{violet}, # boolean type (true) | ||
| 32 | false => $code_for{violet}, # boolean type (false) | ||
| 33 | repeated => $code_for{pink}, # references to seen values | ||
| 34 | caller_info => $code_for{grey}, # details on what's being printed | ||
| 35 | weak => $code_for{green}, # weak references flag | ||
| 36 | tainted => $code_for{green}, # tainted flag | ||
| 37 | unicode => $code_for{green}, # utf8 flag | ||
| 38 | escaped => $code_for{pink}, # escaped characters (\t, \n, etc) | ||
| 39 | brackets => $code_for{empty}, # (), {}, [] | ||
| 40 | separator => $code_for{empty}, # the "," between hash pairs, array elements, etc | ||
| 41 | quotes => $code_for{yellow}, | ||
| 42 | unknown => $code_for{pink}, # any (potential) data type unknown to Data::Printer | ||
| 43 | 3 | }; | |
| 44 | } | ||
| 45 | |||
| 46 | 2 | 1; | |
| 47 | __END__ | ||