Chart/Plotly/Trace/Volume/Slices.pm untested

filter: Statementstmt 0.0% 0 / 42 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 73 CC 5 SCAR 26.9
CC
5
Cov
0%
TO_JSON
30.0
BEGIN
2.0
BEGIN
2.0
CRAP 14.7
1 package Chart::Plotly::Trace::Volume::Slices;
2 use Moose;
3 use MooseX::ExtraArgs;
4 use Moose::Util::TypeConstraints qw(enum union);
5 if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
6 Moose::Util::TypeConstraints::type('PDL');
7 }
8  
9 use Chart::Plotly::Trace::Volume::Slices::X;
10 use Chart::Plotly::Trace::Volume::Slices::Y;
11 use Chart::Plotly::Trace::Volume::Slices::Z;
12  
13 our $VERSION = '0.042'; # VERSION
14  
15 # ABSTRACT: This attribute is one of the possible options for the trace volume.
16  
17 sub TO_JSON {
18 my $self = shift;
19 my $extra_args = $self->extra_args // {};
20 my $meta = $self->meta;
21 my %hash = %$self;
22 for my $name ( sort keys %hash ) {
23 my $attr = $meta->get_attribute($name);
24 if ( defined $attr ) {
25 my $value = $hash{$name};
26 my $type = $attr->type_constraint;
27 if ( $type && $type->equals('Bool') ) {
28 $hash{$name} = $value ? \1 : \0;
29 }
30 }
31 }
32 %hash = ( %hash, %$extra_args );
33 delete $hash{'extra_args'};
34 if ( $self->can('type') && ( !defined $hash{'type'} ) ) {
35 $hash{type} = $self->type();
36 }
37 return \%hash;
38 }
39  
40 has x => ( is => "rw",
41 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Volume::Slices::X", );
42  
43 has y => ( is => "rw",
44 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Volume::Slices::Y", );
45  
46 has z => ( is => "rw",
47 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Volume::Slices::Z", );
48  
49 __PACKAGE__->meta->make_immutable();
50 1;
51  
52 __END__