File Coverage

blib/lib/Data/Printer/Theme/Classic.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 10 11 90.9


line stmt bran cond sub pod time code
1             package Data::Printer::Theme::Classic;
2             # classic Data::Printer colors, for nostalgic users :D
3 1     1   7 use strict;
  1         3  
  1         40  
4 1     1   6 use warnings;
  1         2  
  1         171  
5              
6             sub colors {
7             return {
8 1     1 0 16 array => 'bright_white', # array index numbers
9             number => 'bright_blue', # numbers
10             string => 'bright_yellow', # strings
11             class => 'bright_green', # class names
12             method => 'bright_green', # method names
13             undef => 'bright_red', # the 'undef' value
14             hash => 'magenta', # hash keys
15             regex => 'yellow', # regular expressions
16             code => 'green', # code references
17             glob => 'bright_cyan', # globs (usually file handles)
18             vstring => 'bright_blue', # version strings (v5.16.0, etc)
19             lvalue => '', # lvalue label
20             format => '', # format type
21             true => 'bright_cyan', # boolean type (true)
22             false => 'bright_cyan', # boolean type (false)
23             repeated => 'white on_red', # references to seen values
24             caller_info => 'bright_cyan', # details on what's being printed
25             weak => 'cyan', # weak references
26             tainted => 'red', # tainted content
27             unicode => '', # utf8 flag
28             escaped => 'bright_red', # escaped characters (\t, \n, etc)
29             brackets => '', # (), {}, []
30             separator => '', # the "," between hash pairs, array elements, etc
31             quotes => '',
32             unknown => 'bright_yellow on_blue', # any (potential) data type unknown to Data::Printer
33             };
34             }
35              
36             1;
37             __END__
38              
39             =head1 NAME
40              
41             Data::Printer::Theme::Classic - Classic DDP color theme for nostalgic users
42              
43             =head1 SYNOPSIS
44              
45             In your C<.dataprinter> file:
46              
47             theme = Classic
48              
49             Or during runtime:
50              
51             use DDP theme => 'Classic';
52              
53             =head1 DESCRIPTION
54              
55             This module implements the Classic theme for Data::Printer, which was
56             the default theme before Data::Printer 1.0.
57              
58             =for html <a href="https://metacpan.org/pod/Data::Printer::Theme::Classic"><img src="https://raw.githubusercontent.com/garu/Data-Printer/master/examples/theme-classic.png" alt="Classic Theme" /></a>
59              
60             =head1 SEE ALSO
61              
62             L<Data::Printer>
63              
64             L<Data::Printer::Theme>