blib/lib/CXC/Gnuplot/V1.pm

filter: Statementstmt 50.0% 25 / 50 Branchbran 0.0% 0 / 38 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 5 / 10 Podpod n/a totaltotal 30.6% 30 / 98 CC 20 SCAR 43.4
CC
20
Cov
28%
to_hash
110.0
set
110.0
__ANON__
6.0
CRAP 76.6
« blib/lib/CXC/Gnuplot/V0/Label.pm ↑ Summary blib/lib/CXC/Gnuplot/V0.pm »
1 package CXC::Gnuplot::V1;
2  
3 # ABSTRACT: Map Gnuplot concepts and subsystems onto Perl
4  
5 1 ▶use v5.38;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 our $VERSION = 'v0.29.3';
7  
8 1 ▶use Feature::Compat::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 class CXC::Gnuplot::V0;
11  
12 1 ▶use experimental 'builtin';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use builtin::compat 'is_bool', 'true';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 ▶use CXC::Gnuplot::V1::Util -lexical => 'clone_object', 'pvalidate', 'flatten_array';
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 my sub croak {
18 0 ▶ require Carp;
Subroutine croak: not called CC=1 SCAR=6.9
19 0 goto \&Carp::croak;
20 }
21  
22 #<<< no tidy
23 1 field $xaxis :param :reader = undef;
24 1 field $x2axis :param :reader = undef;
25 1 field $yaxis :param :reader = undef;
26 1 field $y2axis :param :reader = undef;
27 1 field $key :param :reader = undef;
28 1 field $terminal :param :reader = undef;
29 1 field $title :param :reader = undef;
30 1 field $margin :param :reader = undef;
31 1 field $timestamp :param :reader = undef;
32 #>>>
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63 ADJUST {
64  
65 0 ▶ pvalidate( xaxis => Axis => \$xaxis );
Subroutine __ANON__: not called CC=2 SCAR=17.9
66 0 pvalidate( yaxis => Axis => \$yaxis );
67 0 pvalidate( x2axis => Axis => \$x2axis );
68 0 pvalidate( y2axis => Axis => \$y2axis );
69  
70 0 ▶ $key = { on => $key } if is_bool( $key );
Branch: 1 branch
BranchTrueFalseTotal
if builtin::is_bool($key) 0 0 0
71 0 pvalidate( key => Key => \$key );
72 0 pvalidate( terminal => Terminal => \$terminal );
73 0 pvalidate( title => Title => \$title );
74 0 pvalidate( margin => Margin => \$margin );
75 0 pvalidate( timestamp => Timestamp => \$timestamp );
76 }
77  
78  
79  
80  
81  
82  
83 method to_hash {
84  
85 return {
86 0 ▶ ( defined $key ? ( key => $key ) : () ),
Subroutine to_hash: not called CC=10 SCAR=47.0
Branch: 9 branches
BranchTrueFalseTotal
defined $key ? : 0 0 0
defined $margin ? : 0 0 0
defined $terminal ? : 0 0 0
defined $title ? : 0 0 0
defined $x2axis ? : 0 0 0
defined $xaxis ? : 0 0 0
defined $y2axis ? : 0 0 0
defined $yaxis ? : 0 0 0
defined $timestamp ? : 0 0 0
87 ( defined $margin ? ( margin => $margin ) : () ),
88 ( defined $terminal ? ( terminal => $terminal ) : () ),
89 ( defined $title ? ( title => $title ) : () ),
90 ( defined $x2axis ? ( x2axis => $x2axis ) : () ),
91 ( defined $xaxis ? ( xaxis => $xaxis ) : () ),
92 ( defined $y2axis ? ( y2axis => $y2axis ) : () ),
93 ( defined $yaxis ? ( yaxis => $yaxis ) : () ),
94 ( defined $timestamp ? ( timestamp => $timestamp ) : () ),
95 };
96  
97 }
98  
99  
100  
101  
102  
103  
104 ▶method clone ( %args ) {
Subroutine clone: not called CC=1 SCAR=6.9
105 0 clone_object( $self, \%args );
106 }
107  
108  
109  
110  
111  
112 ▶method set ( %opts ) {
Subroutine set: not called CC=10 SCAR=47.0
113  
114 0 my @args;
115  
116 0 ▶ push @args, $terminal->set
Branch: 1 branch
BranchTrueFalseTotal
if defined $terminal 0 0 0
117 if defined $terminal;
118  
119 0 ▶ push @args, $xaxis->set( 'x', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $xaxis 0 0 0
120 if defined $xaxis;
121  
122 0 ▶ push @args, $yaxis->set( 'y', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $yaxis 0 0 0
123 if defined $yaxis;
124  
125 0 ▶ push @args, $x2axis->set( 'x2', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $x2axis 0 0 0
126 if defined $x2axis;
127  
128 0 ▶ push @args, $y2axis->set( 'y2', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $y2axis 0 0 0
129 if defined $y2axis;
130  
131 0 ▶ push @args, $title->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $title 0 0 0
132 if defined $title;
133  
134 0 ▶ push @args, $key->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $key 0 0 0
135 if defined $key;
136  
137 0 ▶ push @args, $margin->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $margin 0 0 0
138 if defined $margin;
139  
140 0 ▶ push @args, $timestamp->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $timestamp 0 0 0
141 if defined $timestamp;
142  
143 0 return @args;
144 }
145  
146  
147  
148 1 1;
149  
150 #
151 # This file is part of CXC-Gnuplot
152 #
153 # This software is Copyright (c) 2024 by Smithsonian Astrophysical Observatory.
154 #
155 # This is free software, licensed under:
156 #
157 # The GNU General Public License, Version 3, June 2007
158 #
159  
160 __END__
« blib/lib/CXC/Gnuplot/V0/Label.pm ↑ Summary blib/lib/CXC/Gnuplot/V0.pm »