Chart/Plotly/Trace/Funnel/Marker/Colorbar/Title.pm

filter: Statementstmt 52.7% 19 / 36 Branchbran 10.0% 1 / 10 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 38.4% 25 / 65 CC 9 SCAR 41.4
CC
9
Cov
37%
TO_JSON
90.0
BEGIN
1.0
BEGIN
1.0
CRAP 62.6
« Chart/Plotly/Trace/Funnel/Connector.pm ↑ Summary Chart/Plotly/Trace/Scatter/Marker/Colorbar/Title.pm »
1 package Chart::Plotly::Trace::Funnel::Marker::Colorbar::Title;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use MooseX::ExtraArgs;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Moose::Util::TypeConstraints qw(enum union);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined Moose::Util::TypeConstraints::find_type_constraint("PDL")) 0 1 1
6 0 Moose::Util::TypeConstraints::type('PDL');
7 }
8  
9 1 ▶use Chart::Plotly::Trace::Funnel::Marker::Colorbar::Title::Font;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our $VERSION = '0.042'; # VERSION
12  
13 # ABSTRACT: This attribute is one of the possible options for the trace funnel.
14  
15 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=9 SCAR=45.0
Pod documented
16 0 my $self = shift;
17 0 ▶ my $extra_args = $self->extra_args // {};
Condition0%0/2
$self->extra_args // {}
l!l
00
MC/DC0%0/1
$self->extra_args // {}
$self->extra_args
Truth table0%0/2
A
A= $self->extra_args
Aresult
11
00
18 0 my $meta = $self->meta;
19 0 my %hash = %$self;
20 0 for my $name ( sort keys %hash ) {
21 0 my $attr = $meta->get_attribute($name);
22 0 ▶ if ( defined $attr ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $attr) 0 0 0
23 0 my $value = $hash{$name};
24 0 my $type = $attr->type_constraint;
25 0 ▶ if ( $type && $type->equals('Bool') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type and $type->equals("Bool")) 0 0 0
Condition0%0/3
$type and $type->equals("Bool")
!ll&&!rl&&r
000
MC/DC0%0/2
$type and $type->equals("Bool")
$type $type->equals("Bool")
Truth table0%0/3
A and B
A= $typeB= $type->equals("Bool")
ABresult
0X0
100
111
26 0 ▶ $hash{$name} = $value ? \1 : \0;
Branch: 1 branch
BranchTrueFalseTotal
$value ? : 0 0 0
27 }
28 }
29 }
30 0 %hash = ( %hash, %$extra_args );
31 0 delete $hash{'extra_args'};
32 0 ▶ if ( $self->can('type') && ( !defined $hash{'type'} ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can("type") and not defined $hash{"type"}) 0 0 0
Condition0%0/3
$self->can("type") and not defined $hash{"type"}
!ll&&!rl&&r
000
MC/DC0%0/2
$self->can("type") and not defined $hash{"type"}
$self->can("type") not defined $hash{"type"}
Truth table0%0/3
A and not(B)
A= $self->can("type")B= not defined $hash{"type"}
ABresult
0X0
100
111
33 0 $hash{type} = $self->type();
34 }
35 0 return \%hash;
36 }
37  
38 1 has font => ( is => "rw",
39 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Funnel::Marker::Colorbar::Title::Font", );
40  
41 1 has side => (
42 is => "rw",
43 isa => enum( [ "right", "top", "bottom" ] ),
44 documentation =>
45 "Determines the location of color bar's title with respect to the color bar. Defaults to *top* when `orientation` if *v* and defaults to *right* when `orientation` if *h*. Note that the title's location used to be set by the now deprecated `titleside` attribute.",
46 );
47  
48 1 has text => (
49 is => "rw",
50 isa => "Str",
51 documentation =>
52 "Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.",
53 );
54  
55 1 __PACKAGE__->meta->make_immutable();
56 1 1;
57  
58 __END__
« Chart/Plotly/Trace/Funnel/Connector.pm ↑ Summary Chart/Plotly/Trace/Scatter/Marker/Colorbar/Title.pm »