blib/lib/CXC/Gnuplot/V0.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 100% 3 / 3 totaltotal 32.6% 33 / 101 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/V1.pm ↑ Summary blib/lib/CXC/Gnuplot/V0/AxisRange.pm »
1 package CXC::Gnuplot::V0;
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::V0::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 ADJUST {
62  
63 0 ▶ pvalidate( xaxis => Axis => \$xaxis );
Subroutine __ANON__: not called CC=2 SCAR=17.9
64 0 pvalidate( yaxis => Axis => \$yaxis );
65 0 pvalidate( x2axis => Axis => \$x2axis );
66 0 pvalidate( y2axis => Axis => \$y2axis );
67  
68 0 ▶ $key = { on => $key } if is_bool( $key );
Branch: 1 branch
BranchTrueFalseTotal
if builtin::is_bool($key) 0 0 0
69 0 pvalidate( key => Key => \$key );
70 0 pvalidate( terminal => Terminal => \$terminal );
71 0 pvalidate( title => Title => \$title );
72 0 pvalidate( margin => Margin => \$margin );
73 0 pvalidate( timestamp => Timestamp => \$timestamp );
74 }
75  
76  
77  
78  
79  
80  
81 method to_hash {
82  
83 return {
84 0 ▶ ( defined $key ? ( key => $key ) : () ),
Subroutine to_hash: not called CC=10 SCAR=47.0
Pod documented
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
85 ( defined $margin ? ( margin => $margin ) : () ),
86 ( defined $terminal ? ( terminal => $terminal ) : () ),
87 ( defined $title ? ( title => $title ) : () ),
88 ( defined $x2axis ? ( x2axis => $x2axis ) : () ),
89 ( defined $xaxis ? ( xaxis => $xaxis ) : () ),
90 ( defined $y2axis ? ( y2axis => $y2axis ) : () ),
91 ( defined $yaxis ? ( yaxis => $yaxis ) : () ),
92 ( defined $timestamp ? ( timestamp => $timestamp ) : () ),
93 };
94  
95 }
96  
97  
98  
99  
100  
101  
102 ▶method clone ( %args ) {
Subroutine clone: not called CC=1 SCAR=6.9
Pod documented
103 0 clone_object( $self, \%args );
104 }
105  
106  
107  
108  
109  
110 ▶method set ( %opts ) {
Subroutine set: not called CC=10 SCAR=47.0
Pod documented
111  
112 0 my @args;
113  
114 0 ▶ push @args, $terminal->set
Branch: 1 branch
BranchTrueFalseTotal
if defined $terminal 0 0 0
115 if defined $terminal;
116  
117 0 ▶ push @args, $xaxis->set( 'x', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $xaxis 0 0 0
118 if defined $xaxis;
119  
120 0 ▶ push @args, $yaxis->set( 'y', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $yaxis 0 0 0
121 if defined $yaxis;
122  
123 0 ▶ push @args, $x2axis->set( 'x2', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $x2axis 0 0 0
124 if defined $x2axis;
125  
126 0 ▶ push @args, $y2axis->set( 'y2', %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $y2axis 0 0 0
127 if defined $y2axis;
128  
129 0 ▶ push @args, $title->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $title 0 0 0
130 if defined $title;
131  
132 0 ▶ push @args, $key->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $key 0 0 0
133 if defined $key;
134  
135 0 ▶ push @args, $margin->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $margin 0 0 0
136 if defined $margin;
137  
138 0 ▶ push @args, $timestamp->set( %opts )
Branch: 1 branch
BranchTrueFalseTotal
if defined $timestamp 0 0 0
139 if defined $timestamp;
140  
141 0 return @args;
142 }
143  
144  
145  
146 1 1;
147  
148 #
149 # This file is part of CXC-Gnuplot
150 #
151 # This software is Copyright (c) 2024 by Smithsonian Astrophysical Observatory.
152 #
153 # This is free software, licensed under:
154 #
155 # The GNU General Public License, Version 3, June 2007
156 #
157  
158 __END__
« blib/lib/CXC/Gnuplot/V1.pm ↑ Summary blib/lib/CXC/Gnuplot/V0/AxisRange.pm »