blib/lib/CXC/Gnuplot/V1/Color.pm

filter: Statementstmt 75.0% 6 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 81.8% 9 / 11 CC 1 SCAR 0.9
CC
1
Cov
75%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/CXC/Gnuplot/V1/AxisTics.pm ↑ Summary blib/lib/CXC/Gnuplot/V1/ColorSpec.pm »
1 package CXC::Gnuplot::V1::Color;
2  
3 2 ▶use v5.38;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use experimental 'declared_refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Object::Pad 0.821;
Subroutine BEGIN: called CC=1 SCAR=2.6
6  
7 our $VERSION = 'v0.29.3';
8  
9 class CXC::Gnuplot::V1::Color : isa(CXC::Gnuplot::V1::Base) does( CXC::Gnuplot::V1::Role::Clone );
10  
11 use CXC::Gnuplot::V1::Util -lexical, 'to_hash_r';
12  
13 ## no critic (Community::DollarAB)
14 #<<< no tidy
15 field $name :param :reader;
16 field $rgb :param :reader;
17 field $r :param :reader;
18 field $g :param :reader;
19 field $b :param :reader;
20 #>>>
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50 method to_hash ( ) {
51 to_hash_r( {
52 ( defined $name ? ( name => $name ) : () ),
53 ( defined $rgb ? ( rgb => $rgb ) : () ),
54 ( defined $r ? ( r => $r ) : () ),
55 ( defined $g ? ( g => $g ) : () ),
56 ( defined $b ? ( b => $b ) : () ),
57 } );
58 }
59  
60 #
61 # This file is part of CXC-Gnuplot
62 #
63 # This software is Copyright (c) 2024 by Smithsonian Astrophysical Observatory.
64 #
65 # This is free software, licensed under:
66 #
67 # The GNU General Public License, Version 3, June 2007
68 #
69  
70 1;
71  
72 __END__
« blib/lib/CXC/Gnuplot/V1/AxisTics.pm ↑ Summary blib/lib/CXC/Gnuplot/V1/ColorSpec.pm »