blib/lib/CXC/Gnuplot/V0/Bound/Numeric.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran 33.3% 2 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 68.2% 28 / 41 CC 5 SCAR 16.2
CC
5
Cov
69%
__ANON__
9.7
croak
2.0
BEGIN
1.0
CRAP 5.0
« blib/lib/CXC/Gnuplot/V1/Types.pm ↑ Summary blib/lib/CXC/Gnuplot/V0/CoordPosition2D.pm »
1 package CXC::Gnuplot::V0::Bound::Numeric;
2  
3 2 ▶use v5.38;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Feature::Compat::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = 'v0.29.3';
7  
8 1 ▶class CXC::Gnuplot::V0::Bound::Numeric : isa(CXC::Gnuplot::V0::Bound);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 my sub croak {
11 0 ▶ require Carp;
Subroutine croak: not called CC=1 SCAR=6.9
12 0 goto \&Carp::croak;
13 }
14  
15 2 ▶use CXC::Gnuplot::V0::Types -lexical => 'Num', 'is_Num';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶use CXC::Gnuplot::V0::Util -lexical => 'pvalidate';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18  
19  
20  
21  
22  
23  
24  
25  
26 ADJUST {
27  
28 6 ▶ pvalidate( lower_bound => Num, \$self->lower_bound );
Subroutine __ANON__: called CC=5 SCAR=22.7
29 6 pvalidate( upper_bound => Num, \$self->upper_bound );
30  
31 6 ▶ if ( !is_Num( $self->bound ) ) {
Branch: 2 branches
BranchTrueFalseTotal
if (not is_Num($self->bound)) { } 0 6 6
elsif (defined $self->lower_bound or defined $self->upper_bound) { } 0 6 6
32 0 ▶ croak( '"bound" parameter must be a number or the characger "*"' )
Branch: 1 branch
BranchTrueFalseTotal
if $self->bound ne "*" 0 0 0
33 if $self->bound ne q{*};
34 }
35 ▶ elsif (defined $self->lower_bound
Condition33%1/3
defined $self->lower_bound or defined $self->upper_bound
l!l&&r!l&&!r
006
MC/DC0%0/2
defined $self->lower_bound or defined $self->upper_bound
defined $self->lower_bound defined $self->upper_bound
Truth table33%1/3
A or B
A= defined $self->lower_boundB= defined $self->upper_bound
ABresult
1X1
011
000
36 or defined $self->upper_bound )
37 {
38 0 croak(
39 '"bound" parameter cannot be a number if any of the "upper_bound" or "lower_bound" parameters are specified',
40 );
41 }
42  
43 }
44  
45 2 1;
46  
47 #
48 # This file is part of CXC-Gnuplot
49 #
50 # This software is Copyright (c) 2024 by Smithsonian Astrophysical Observatory.
51 #
52 # This is free software, licensed under:
53 #
54 # The GNU General Public License, Version 3, June 2007
55 #
56  
57 __END__
« blib/lib/CXC/Gnuplot/V1/Types.pm ↑ Summary blib/lib/CXC/Gnuplot/V0/CoordPosition2D.pm »