ColorTheme/Data/Dump/Color/Default16.pm

filter: Statementstmt 100% 17 / 17 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 96.0% 24 / 25 CC 3 SCAR 7.0
CC
3
Cov
95%
_ansi16
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« ColorTheme/Data/Dump/Color/Light.pm ↑ Summary auto/share/dist/Data-Dump-Color/examples/example.pl »
1 package ColorTheme::Data::Dump::Color::Default16;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use parent 'ColorThemeBase::Static::FromStructColors';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Term::ANSIColor;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8 1 our $DATE = '2025-02-21'; # DATE
9 1 our $DIST = 'Data-Dump-Color'; # DIST
10 1 our $VERSION = '0.251'; # VERSION
11  
12 12 ▶sub _ansi16 {
Subroutine _ansi16: called CC=3 SCAR=11.1
13 12 my ($fg, $bg) = @_;
14 return {
15 12 ▶ (defined $fg ? (ansi_fg=>color($fg)) : ()),
Branch: 2 branches
BranchTrueFalseTotal
defined $fg ? : 12 0 12
defined $bg ? : 1 11 12
16 (defined $bg ? (ansi_bg=>color($bg)) : ()),
17 };
18 }
19  
20 1 our %THEME = (
21 v => 2,
22 items => {
23 Regexp => _ansi16('yellow'),
24 undef => _ansi16('bright_red'),
25 number => _ansi16('bright_blue'), # floats can have different color
26 float => _ansi16('cyan'),
27 string => _ansi16('bright_yellow'),
28 object => _ansi16('bright_green'),
29 glob => _ansi16('bright_cyan'),
30 key => _ansi16('magenta'),
31 comment => _ansi16('green'),
32 keyword => _ansi16('blue'),
33 symbol => _ansi16('cyan'),
34 linum => _ansi16('black', 'on_white'), # file:line number
35 },
36 );
37  
38 #use Data::Dump; dd \%THEME;
39  
40 1 1;
41 # ABSTRACT: Default color theme for Data::Dump::Color (16 color)
42  
43 __END__
« ColorTheme/Data/Dump/Color/Light.pm ↑ Summary auto/share/dist/Data-Dump-Color/examples/example.pl »