| 1 |
|
| package Chart::GGPlot::Backend::Plotly; |
| 2 |
|
| |
| 3 |
|
| # ABSTRACT: Plotly backend for Chart::GGPlot |
| 4 |
|
| |
| 5 |
1 |
▶ | use Chart::GGPlot::Class qw(:pdl); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 6 |
1 |
▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 7 |
|
| |
| 8 |
1 |
| our $VERSION = '0.002003'; # VERSION |
| 9 |
|
| |
| 10 |
1 |
| with qw(Chart::GGPlot::Backend); |
| 11 |
|
| |
| 12 |
1 |
▶ | use Chart::Plotly qw(show_plot); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 13 |
1 |
▶ | use Chart::Plotly::Plot; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 14 |
1 |
▶ | use Chart::Plotly::Image; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 15 |
|
| |
| 16 |
1 |
▶ | use Data::Munge qw(elem); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 17 |
1 |
▶ | use JSON; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 18 |
1 |
▶ | use List::AllUtils qw(pairmap pairwise uniq); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 19 |
1 |
▶ | use Module::Load; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 20 |
1 |
▶ | use Types::Standard qw(HashRef Int); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 21 |
|
| |
| 22 |
1 |
▶ | use Chart::GGPlot::Aes; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 23 |
1 |
▶ | use Chart::GGPlot::Util qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 24 |
1 |
▶ | use Chart::GGPlot::Backend::Plotly::Geom; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 25 |
1 |
▶ | use Chart::GGPlot::Backend::Plotly::Util qw(br to_rgb); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 26 |
1 |
▶ | use Chart::GGPlot::Util qw(rescale); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 27 |
|
| |
| 28 |
|
| #TODO: To test and see which value is proper. |
| 29 |
1 |
| our $WEBGL_THRESHOLD = 2000; |
| 30 |
|
| |
| 31 |
0 |
▶ | classmethod _split_on($class_geom_impl, $data) { |
|
Subroutine
_split_on: not called CC=3 SCAR=24.8
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for classmethod _split_on (expected 3, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for classmethod _split_on (expected 3, got ' . @_ . ')') |
0 |
0 |
0 |
|
| 32 |
0 |
| my $aes = $class_geom_impl->split_on; |
| 33 |
0 |
| return [ grep { $data->exists($_) } map { "${_}_raw" } @$aes ]; |
| 34 |
1 |
| } |
| 35 |
|
| |
| 36 |
0 |
▶ | method layer_to_traces ($layer, $data, $prestats_data, $layout, $plot) { |
|
Subroutine
layer_to_traces: not called CC=11 SCAR=48.8
Pod
undocumented
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 6 and Function::Parameters::_croak('Too few arguments for method layer_to_traces (expected 6, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 6 and Function::Parameters::_croak('Too many arguments for method layer_to_traces (expected 6, got ' . @_ . ')') |
0 |
0 |
0 |
|
| 37 |
0 |
▶ | return if ( $data->isempty ); |
Branch: 1 branch
| Branch | True | False | Total |
| if $data->isempty |
0 |
0 |
0 |
|
| 38 |
|
| |
| 39 |
0 |
| my $geom = $layer->geom; |
| 40 |
0 |
▶ | my $class_geom = ( ref($geom) || $geom ); |
MC/DC0%0/2
ref $geom || $geom
ref $geom
$geom
Truth table0%0/3
A || B
A= ref $geomB= $geom
|
| 41 |
0 |
| my $short = $class_geom =~ s/^Chart::GGPlot::Geom:://r; |
| 42 |
0 |
| my $class_geom_impl = "Chart::GGPlot::Backend::Plotly::Geom::$short"; |
| 43 |
0 |
| load($class_geom_impl); |
| 44 |
|
| |
| 45 |
0 |
| my $geom_params = $layer->geom_params; |
| 46 |
0 |
| my $stat_params = $layer->stat_params; |
| 47 |
0 |
| my $aes_params = $layer->aes_params; |
| 48 |
0 |
| my $params = $geom_params->merge($stat_params)->merge($aes_params); |
| 49 |
|
| |
| 50 |
0 |
| my $coord = $layout->coord; |
| 51 |
|
| |
| 52 |
|
| my %discrete_scales = map { |
| 53 |
0 |
| my $scale = $_; |
| 54 |
0 |
▶ | if ( $scale->isa('Chart::GGPlot::Scale::Discrete') ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($scale->isa('Chart::GGPlot::Scale::Discrete')) { } |
0 |
0 |
0 |
|
| 55 |
0 |
| map { $_ => $scale } @{ $scale->aesthetics }; |
| 56 |
|
| } |
| 57 |
|
| else { |
| 58 |
0 |
| (); |
| 59 |
|
| } |
| 60 |
0 |
| } @{ $plot->scales->non_position_scales->scales }; |
| 61 |
|
| |
| 62 |
|
| # variables that produce multiple traces and deserve their own legend entries |
| 63 |
0 |
| my @split_legend = map { "${_}_raw" } ( sort keys %discrete_scales ); |
| 64 |
0 |
▶ | $log->debugf( "Variables that would cause legend be splitted : %s", |
Branch: 1 branch
| Branch | True | False | Total |
| if $Chart::GGPlot::Backend::Plotly::log->is_debug |
0 |
0 |
0 |
|
| 65 |
|
| Dumper( \@split_legend ) ) |
| 66 |
|
| if $log->is_debug; |
| 67 |
|
| |
| 68 |
|
| my $split_by = |
| 69 |
0 |
| [ uniq( @split_legend, @{ $self->_split_on( $class_geom_impl, $data ) } ) |
| 70 |
|
| ]; |
| 71 |
|
| |
| 72 |
0 |
| my $split_vars = $split_by->intersect($data->names); |
| 73 |
|
| |
| 74 |
0 |
| my $hover_text_aes; # which aes shall be displayed in hover text? |
| 75 |
|
| { |
| 76 |
|
| # While $plot->labels also looks like containing what we need, |
| 77 |
|
| # actually it be cleared or set to other values, so it can't |
| 78 |
|
| # really be used for generating the hovertext. Here we would |
| 79 |
|
| # get the aes from $layer->mapping and $layer->stat. |
| 80 |
0 |
| my $map = $layer->mapping; |
| 81 |
0 |
| my $calc_aes = $layer->stat->default_aes->hslice( |
| 82 |
|
| $layer->calculated_aes( $layer->stat->default_aes ) ); |
| 83 |
0 |
| $map = $map->merge($calc_aes); |
| 84 |
0 |
▶ | if ( $layer->inherit_aes ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($layer->inherit_aes) |
0 |
0 |
0 |
|
| 85 |
0 |
| $map = $map->merge( $plot->mapping ); |
| 86 |
|
| } |
| 87 |
0 |
| $hover_text_aes = Chart::GGPlot::Plot->make_labels($map); |
| 88 |
|
| } |
| 89 |
|
| |
| 90 |
|
| # put x and y at first in plotly hover text |
| 91 |
0 |
| my $all_aesthetics = Chart::GGPlot::Aes->all_aesthetics; |
| 92 |
|
| my @hover_aes_ordered = ( |
| 93 |
|
| qw(x y), |
| 94 |
|
| ( |
| 95 |
|
| sort grep { |
| 96 |
0 |
▶ | $_ ne 'x' and $_ ne 'y' and elem( $_, $all_aesthetics ) |
Condition0%0/6
$_ ne 'x' && $_ ne 'y' && elem($_, $all_aesthetics)
MC/DC0%0/3
$_ ne 'x' && $_ ne 'y' && elem($_, $all_aesthetics)
$_ ne "x"
$_ ne "y"
elem($_, $all_aesthetics)
Truth table0%0/4
A and B && C
A= $_ ne "x"B= $_ ne "y"C= elem($_, $all_aesthetics)
| A | B | C | result |
| 0 | X | X | 0 |
| 1 | 0 | X | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
|
| 97 |
0 |
| } @{$hover_text_aes->keys} |
| 98 |
|
| ) |
| 99 |
|
| ); |
| 100 |
|
| # throw out positional coordinates if we're hovering on fill |
| 101 |
0 |
| my $hover_on = $class_geom_impl->hover_on(); |
| 102 |
0 |
▶ | if ($hover_on eq 'fills') { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($hover_on eq "fills") |
0 |
0 |
0 |
|
| 103 |
|
| @hover_aes_ordered = |
| 104 |
0 |
| grep { not elem( $_, [qw(x xmin xmax y ymin ymax)] ) } |
| 105 |
|
| @hover_aes_ordered; |
| 106 |
|
| } |
| 107 |
0 |
| my @hover_labels = map { $_ => $hover_text_aes->at($_) } @hover_aes_ordered; |
| 108 |
|
| |
| 109 |
0 |
▶ | my $panel_to_traces = fun( $d, $panel_params ) { |
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for fun (anon) (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 2 and Function::Parameters::_croak('Too many arguments for fun (anon) (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
|
| 110 |
0 |
| my $hovertext = $class_geom_impl->make_hovertext($d, \@hover_labels); |
| 111 |
0 |
| $d->set( 'hovertext', PDL::SV->new($hovertext) ); |
| 112 |
|
| |
| 113 |
0 |
| my @splitted_sorted; |
| 114 |
0 |
▶ | if ( $split_vars->length ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($split_vars->length) { } |
0 |
0 |
0 |
|
| 115 |
0 |
| my $fac = do { |
| 116 |
0 |
| my $d_tmp = $d->select_columns($split_vars); |
| 117 |
0 |
| my $lvls = $d_tmp->uniq->sort($split_vars); |
| 118 |
0 |
| my $fac_levels = $lvls->id; |
| 119 |
0 |
| my $i = 0; |
| 120 |
0 |
| my %fac_levels = map { $_ => $i++ } $fac_levels->flatten; |
| 121 |
|
| PDL::Factor->new( |
| 122 |
0 |
| [ map { $fac_levels{$_} } $d_tmp->id->flatten ], |
| 123 |
|
| levels => [ 0 .. $fac_levels->length - 1 ], |
| 124 |
|
| ); |
| 125 |
|
| }; |
| 126 |
|
| |
| 127 |
0 |
| my $splitted = $d->split($fac); |
| 128 |
|
| @splitted_sorted = |
| 129 |
0 |
| map { $splitted->{$_} } sort { $a cmp $b } keys %$splitted; |
| 130 |
|
| } |
| 131 |
|
| else { |
| 132 |
0 |
| push @splitted_sorted, $d; |
| 133 |
|
| } |
| 134 |
|
| |
| 135 |
0 |
| my $showlegend = @split_legend->intersect( $data->names )->length > 0; |
| 136 |
|
| return @splitted_sorted->map( |
| 137 |
0 |
▶ | sub { |
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
|
| 138 |
0 |
| my ($d) = @_; |
| 139 |
|
| |
| 140 |
0 |
| my $traces = $class_geom_impl->to_traces($d, $params, $plot); |
| 141 |
0 |
| for my $trace (@$traces) { |
| 142 |
|
| my $legend_key = join( |
| 143 |
|
| ', ', |
| 144 |
|
| map { |
| 145 |
0 |
▶ | if ( $d->exists($_) ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($d->exists($_)) { } |
0 |
0 |
0 |
|
| 146 |
0 |
| my $col_data = $d->at($_); |
| 147 |
0 |
| $col_data->slice(pdl(0))->as_pdlsv->at(0); |
| 148 |
|
| } |
| 149 |
|
| else { |
| 150 |
0 |
| (); |
| 151 |
|
| } |
| 152 |
|
| } @split_legend |
| 153 |
|
| ); |
| 154 |
0 |
| $trace->name($legend_key); |
| 155 |
|
| |
| 156 |
|
| # some types like heatmap may not have below methods |
| 157 |
0 |
▶ | if ( $trace->can('showlegend') ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($trace->can("showlegend")) |
0 |
0 |
0 |
|
| 158 |
0 |
| $trace->legendgroup($legend_key); |
| 159 |
0 |
| $trace->showlegend($showlegend); |
| 160 |
|
| } |
| 161 |
|
| } |
| 162 |
0 |
| return @$traces; |
| 163 |
|
| } |
| 164 |
0 |
| ); |
| 165 |
0 |
| }; |
| 166 |
|
| |
| 167 |
0 |
| my $splitted_data = $data->split( $data->at('PANEL') ); |
| 168 |
0 |
| my $splitted_prestats_data = |
| 169 |
|
| $prestats_data->split( $prestats_data->at('PANEL') ); |
| 170 |
|
| return [ |
| 171 |
0 |
▶ | pairmap { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
|
| 172 |
0 |
| my ( $panel_id, $panel_data ) = ( $a, $b ); |
| 173 |
|
| |
| 174 |
0 |
| my $panel_prestats_data = $splitted_prestats_data->{$panel_id}; |
| 175 |
0 |
| my $traces = $panel_to_traces->( |
| 176 |
|
| $class_geom_impl->prepare_data( |
| 177 |
|
| $panel_data, $panel_prestats_data, $layout, |
| 178 |
|
| $params, $plot |
| 179 |
|
| ), |
| 180 |
|
| $layout->panel_params->at($panel_id) |
| 181 |
|
| ); |
| 182 |
|
| } |
| 183 |
0 |
| %$splitted_data |
| 184 |
|
| ]; |
| 185 |
1 |
| } |
| 186 |
|
| |
| 187 |
|
| |
| 188 |
|
| # create a hidden trace only for displaying colorbar |
| 189 |
0 |
▶ | method _colorbar_to_trace ($guide) { |
|
Subroutine
_colorbar_to_trace: not called CC=3 SCAR=24.8
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for method _colorbar_to_trace (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 2 and Function::Parameters::_croak('Too many arguments for method _colorbar_to_trace (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
|
| 190 |
0 |
| load Chart::Plotly::Trace::Scatter; |
| 191 |
0 |
| load Chart::Plotly::Trace::Scatter::Marker; |
| 192 |
0 |
| load Chart::Plotly::Trace::Scatter::Marker::Colorbar; |
| 193 |
0 |
| load Chart::Plotly::Trace::Scatter::Marker::Colorbar::Title; |
| 194 |
|
| |
| 195 |
|
| # do everything on a 0-1 scale |
| 196 |
|
| |
| 197 |
0 |
| my $rng = pdl($guide->bar->at('value')->minmax); |
| 198 |
0 |
| my @colorscale_color = to_rgb( $guide->bar->at('color') )->list; |
| 199 |
0 |
| my @colorscale_value = |
| 200 |
|
| rescale( $guide->bar->at('value'), pdl( [ 0, 1 ] ), $rng )->list; |
| 201 |
|
| my @colorscale = ( |
| 202 |
0 |
▶ | pairwise { [ $a, $b ] } |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
|
| 203 |
0 |
| @colorscale_value, @colorscale_color |
| 204 |
|
| ); |
| 205 |
0 |
| my $ticktext = $guide->key->at('label')->unpdl; |
| 206 |
0 |
| my $tickvals = |
| 207 |
|
| rescale( $guide->key->at('value'), pdl( [ 0, 1 ] ), $rng )->unpdl; |
| 208 |
|
| |
| 209 |
0 |
| my $marker = Chart::Plotly::Trace::Scatter::Marker->new( |
| 210 |
|
| color => [ 0, 1 ], |
| 211 |
|
| colorscale => \@colorscale, |
| 212 |
|
| colorbar => Chart::Plotly::Trace::Scatter::Marker::Colorbar->new( |
| 213 |
|
| title => |
| 214 |
|
| Chart::Plotly::Trace::Scatter::Marker::Colorbar::Title->new( |
| 215 |
|
| text => $guide->title, |
| 216 |
|
| side => 'top' |
| 217 |
|
| ), |
| 218 |
|
| # R's default is 1.2 "lines" for "legend.key.size". |
| 219 |
|
| # We don't support the grid unit system now (maybe in future |
| 220 |
|
| # we can develop it on Graphics::Grid::Unit), now we just |
| 221 |
|
| # leave it be for plotly to use its default. |
| 222 |
|
| #thickness => 30, |
| 223 |
|
| tickmode => 'array', |
| 224 |
|
| ticktext => $ticktext, |
| 225 |
|
| tickvals => $tickvals, |
| 226 |
|
| ticklen => 2, |
| 227 |
|
| len => 0.5, |
| 228 |
|
| ), |
| 229 |
|
| ); |
| 230 |
|
| |
| 231 |
0 |
| return Chart::Plotly::Trace::Scatter->new( |
| 232 |
|
| x => [0], |
| 233 |
|
| y => [0], |
| 234 |
|
| type => 'scatter', |
| 235 |
|
| mode => 'markers', |
| 236 |
|
| opacity => 0, |
| 237 |
|
| hoverinfo => 'none', |
| 238 |
|
| showlegend => 0, |
| 239 |
|
| marker => $marker, |
| 240 |
|
| ); |
| 241 |
1 |
| } |
| 242 |
|
| |
| 243 |
0 |
▶ | method _to_plotly ($plot_built) { |
|
Subroutine
_to_plotly: not called CC=50 SCAR=78.4
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for method _to_plotly (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 2 and Function::Parameters::_croak('Too many arguments for method _to_plotly (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
|
| 244 |
0 |
| my $plot = $plot_built->plot; |
| 245 |
0 |
| my $layers = $plot->layers; |
| 246 |
0 |
| my $layout = $plot_built->layout; |
| 247 |
|
| |
| 248 |
0 |
| my $plotly = Chart::Plotly::Plot->new(); |
| 249 |
|
| |
| 250 |
0 |
| my $scales = $layout->get_scales(0); |
| 251 |
0 |
| my $panel_params = $layout->panel_params->at(0); |
| 252 |
|
| |
| 253 |
|
| # prepare theme and calc elements |
| 254 |
0 |
| my $theme = $plot->theme; |
| 255 |
0 |
| my $elements = $theme->keys; |
| 256 |
0 |
| for my $elname (@$elements) { |
| 257 |
0 |
| my $el = $theme->at($elname); |
| 258 |
0 |
▶ | if ($el->$_DOES('Chart::GGPlot::Theme::Element')) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($el->$Chart::GGPlot::Backend::Plotly::_DOES("Chart::GGPlot::Theme::Element")) |
0 |
0 |
0 |
|
| 259 |
0 |
| $theme->set($elname, $theme->calc_element($elname)); |
| 260 |
|
| } |
| 261 |
|
| } |
| 262 |
|
| |
| 263 |
0 |
| my $el_panel_bg = $theme->at('panel_background'); |
| 264 |
0 |
| my $el_plot_bg = $theme->at('plot_background'); |
| 265 |
|
| |
| 266 |
0 |
▶ | my %plotly_layout = ( |
Branch: 2 branches
| Branch | True | False | Total |
| !defined($el_panel_bg) || $el_panel_bg->is_blank ? : |
0 |
0 |
0 |
| !defined($el_plot_bg) || $el_plot_bg->is_blank ? : |
0 |
0 |
0 |
Condition0%0/6
not defined $el_panel_bg or $el_panel_bg->is_blank
not defined $el_plot_bg or $el_plot_bg->is_blank
MC/DC0%0/2
not defined $el_panel_bg or $el_panel_bg->is_blank
not defined $el_panel_bg
$el_panel_bg->is_blank
MC/DC0%0/2
not defined $el_plot_bg or $el_plot_bg->is_blank
not defined $el_plot_bg
$el_plot_bg->is_blank
Truth table0%0/3
not(A) or B
A= not defined $el_panel_bgB= $el_panel_bg->is_blank
Truth table0%0/3
not(A) or B
A= not defined $el_plot_bgB= $el_plot_bg->is_blank
|
| 267 |
|
| ( |
| 268 |
|
| ( not defined $el_panel_bg or $el_panel_bg->is_blank ) ? () |
| 269 |
|
| : ( plot_bgcolor => to_rgb( $el_panel_bg->at('fill') ) ) |
| 270 |
|
| ), |
| 271 |
|
| ( |
| 272 |
|
| ( not defined $el_plot_bg or $el_plot_bg->is_blank ) ? () |
| 273 |
|
| : ( paper_bgcolor => to_rgb( $el_plot_bg->at('fill') ) ) |
| 274 |
|
| ), |
| 275 |
|
| ); |
| 276 |
|
| |
| 277 |
0 |
| my $labels = $plot->labels; |
| 278 |
0 |
| my $title = $labels->{title}; |
| 279 |
0 |
▶ | if ( defined $labels->{title} and length($title) ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (defined $labels->{"title"} and length $title) |
0 |
0 |
0 |
Condition0%0/3
defined $labels->{"title"} and length $title
MC/DC0%0/2
defined $labels->{"title"} and length $title
defined $labels->{"title"}
length $title
Truth table0%0/3
A and B
A= defined $labels->{"title"}B= length $title
|
| 280 |
|
| |
| 281 |
|
| # NOTE: plotly does not directly support subtitle |
| 282 |
|
| # See https://github.com/plotly/plotly.js/issues/233 |
| 283 |
|
| |
| 284 |
0 |
| my $subtitle = $labels->{subtitle}; |
| 285 |
0 |
▶ | if ( defined $subtitle and length($subtitle) ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (defined $subtitle and length $subtitle) |
0 |
0 |
0 |
Condition0%0/3
defined $subtitle and length $subtitle
MC/DC0%0/2
defined $subtitle and length $subtitle
defined $subtitle
length $subtitle
Truth table0%0/3
A and B
A= defined $subtitleB= length $subtitle
|
| 286 |
0 |
| $title .= br() . sprintf( "%s", $subtitle ); |
| 287 |
|
| } |
| 288 |
0 |
| $plotly_layout{title} = $title; |
| 289 |
|
| } |
| 290 |
|
| |
| 291 |
0 |
| my $barmode; |
| 292 |
0 |
| for my $xy (qw(x y)) { |
| 293 |
|
| |
| 294 |
0 |
▶ | my $theme_el = sub { |
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
|
| 295 |
0 |
| my ($elname) = @_; |
| 296 |
0 |
▶ | return ($theme->at("${elname}.${xy}") // $theme->at($elname)); |
Condition0%0/3
$theme->at("$elname.$xy") // $theme->at($elname)
MC/DC0%0/2
$theme->at("$elname.$xy") // $theme->at($elname)
$theme->at("$elname.$xy")
$theme->at($elname)
Truth table0%0/3
A // B
A= $theme->at("$elname.$xy")B= $theme->at($elname)
|
| 297 |
0 |
| }; |
| 298 |
|
| |
| 299 |
0 |
| my $axis_name; |
| 300 |
|
| my $sc; |
| 301 |
0 |
▶ | if ( $plot->coordinates->DOES('Chart::GGPlot::Coord::Flip') ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($plot->coordinates->DOES('Chart::GGPlot::Coord::Flip')) { } |
0 |
0 |
0 |
|
| 302 |
0 |
▶ | my $new_xy = $xy eq 'x' ? 'y' : 'x'; |
Branch: 1 branch
| Branch | True | False | Total |
| $xy eq 'x' ? : |
0 |
0 |
0 |
|
| 303 |
0 |
| $axis_name = "${new_xy}axis"; |
| 304 |
0 |
| $sc = $scales->{$new_xy}; |
| 305 |
|
| } else { |
| 306 |
0 |
| $axis_name = "${xy}axis"; |
| 307 |
0 |
| $sc = $scales->{$xy}; |
| 308 |
|
| } |
| 309 |
|
| |
| 310 |
0 |
▶ | my $axis_title = $sc->name // $labels->at($xy) // ''; |
Condition0%0/5
($sc->name // $labels->at($xy)) // ""
$sc->name // $labels->at($xy)
MC/DC0%0/2
($sc->name // $labels->at($xy)) // ""
$sc->name
$labels->at($xy)
Truth table0%0/3
A // B
A= $sc->nameB= $labels->at($xy)
|
| 311 |
|
| |
| 312 |
0 |
| my $range = $panel_params->{"$xy.range"}->unpdl; |
| 313 |
0 |
| my $labels = $panel_params->{"$xy.labels"}->as_pdlsv; |
| 314 |
|
| |
| 315 |
|
| # TODO: fix this in Data::Frame's PDL patch |
| 316 |
0 |
▶ | unless ( $labels->DOES('PDL::SV') and $labels->type >= PDL::float ) { |
Branch: 1 branch
| Branch | True | False | Total |
| unless ($labels->DOES("PDL::SV") and $labels->type >= PDL::float()) |
0 |
0 |
0 |
Condition0%0/3
$labels->DOES("PDL::SV") and $labels->type >= PDL::float()
MC/DC0%0/2
$labels->DOES("PDL::SV") and $labels->type >= PDL::float()
$labels->DOES("PDL::SV")
$labels->type >= PDL::float()
Truth table0%0/3
A and B
A= $labels->DOES("PDL::SV")B= $labels->type >= PDL::float()
|
| 317 |
|
| $labels = PDL::SV->new( |
| 318 |
|
| [ |
| 319 |
|
| map { |
| 320 |
0 |
| my $s = sprintf( $PDL::doubleformat, $_ ); |
| 321 |
0 |
| $s =~ s/^\s*//gr; |
| 322 |
0 |
| } @{ $labels->unpdl } |
| 323 |
|
| ] |
| 324 |
|
| ); |
| 325 |
|
| } |
| 326 |
0 |
| $labels = $labels->unpdl; |
| 327 |
|
| |
| 328 |
0 |
| my $major_source = $panel_params->{"$xy.major_source"}->unpdl; |
| 329 |
0 |
▶ | my %ticks = pairwise { $a => $b } @$major_source, @$labels; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
|
| 330 |
|
| |
| 331 |
|
| # TODO: |
| 332 |
|
| # Plotly does not well support minor ticks. Although we could |
| 333 |
|
| # specify empty string at ticktext for minor ticks (like via below |
| 334 |
|
| # lines I comment out), because of plotly's limitation minor |
| 335 |
|
| # and major ticks has to be of same tick length on axises, which |
| 336 |
|
| # looks ugly. In contrast ggplot2 would defaultly have a zero |
| 337 |
|
| # length for minor ticks. R's plotly module simply discards minor |
| 338 |
|
| # ticks. For now we just follow that. |
| 339 |
|
| |
| 340 |
|
| # There is not necessarily minor ticks for an axis. |
| 341 |
|
| #my $minor_source = $panel_params->{"$xy.minor_source"}; |
| 342 |
|
| #my $tickvals = |
| 343 |
|
| # defined $minor_source ? $minor_source->unpdl : $major_source; |
| 344 |
|
| |
| 345 |
0 |
| my $tickvals = $major_source; |
| 346 |
0 |
▶ | my $ticktext = [ map { $ticks{$_} // '' } @$tickvals ]; |
MC/DC0%0/1
$ticks{$_} // ""
$ticks{$_}
|
| 347 |
|
| |
| 348 |
|
| my ( $el_axis_line, $el_axis_text, $el_axis_ticks, $el_axis_title ) = |
| 349 |
0 |
| map { $theme_el->($_) } qw(axis_line axis_text axis_ticks axis_title); |
| 350 |
0 |
▶ | my $el_panel_grid = $theme_el->('panel_grid_major') |
Condition0%0/3
&$theme_el("panel_grid_major") // $theme->at("panel_grid")
MC/DC0%0/2
&$theme_el("panel_grid_major") // $theme->at("panel_grid")
&$theme_el("panel_grid_major")
$theme->at("panel_grid")
Truth table0%0/3
A // B
A= &$theme_el("panel_grid_major")B= $theme->at("panel_grid")
|
| 351 |
|
| // $theme->at('panel_grid'); |
| 352 |
|
| |
| 353 |
0 |
▶ | $plotly_layout{$axis_name} = { |
Branch: 5 branches
| Branch | True | False | Total |
| !defined($el_axis_title) || $el_axis_title->is_blank ? : |
0 |
0 |
0 |
| !defined($el_axis_ticks) || $el_axis_ticks->is_blank ? : |
0 |
0 |
0 |
| !defined($el_axis_text) || $el_axis_text->is_blank ? : |
0 |
0 |
0 |
| !defined($el_axis_line) || $el_axis_line->is_blank ? : |
0 |
0 |
0 |
| !defined($el_panel_grid) || $el_panel_grid->is_blank ? : |
0 |
0 |
0 |
Condition0%0/17
not defined $el_axis_title or $el_axis_title->is_blank
not defined $el_axis_ticks or $el_axis_ticks->is_blank
$el_axis_ticks->at("angle") // 0
not defined $el_axis_text or $el_axis_text->is_blank
not defined $el_axis_line or $el_axis_line->is_blank
not defined $el_panel_grid or $el_panel_grid->is_blank
MC/DC0%0/2
not defined $el_axis_title or $el_axis_title->is_blank
not defined $el_axis_title
$el_axis_title->is_blank
MC/DC0%0/2
not defined $el_axis_ticks or $el_axis_ticks->is_blank
not defined $el_axis_ticks
$el_axis_ticks->is_blank
MC/DC0%0/1
$el_axis_ticks->at("angle") // 0
$el_axis_ticks->at("angle")
MC/DC0%0/2
not defined $el_axis_text or $el_axis_text->is_blank
not defined $el_axis_text
$el_axis_text->is_blank
MC/DC0%0/2
not defined $el_axis_line or $el_axis_line->is_blank
not defined $el_axis_line
$el_axis_line->is_blank
MC/DC0%0/2
not defined $el_panel_grid or $el_panel_grid->is_blank
not defined $el_panel_grid
$el_panel_grid->is_blank
Truth table0%0/3
not(A) or B
A= not defined $el_axis_titleB= $el_axis_title->is_blank
Truth table0%0/3
not(A) or B
A= not defined $el_axis_ticksB= $el_axis_ticks->is_blank
Truth table0%0/2
A
A= $el_axis_ticks->at("angle")
Truth table0%0/3
not(A) or B
A= not defined $el_axis_textB= $el_axis_text->is_blank
Truth table0%0/3
not(A) or B
A= not defined $el_axis_lineB= $el_axis_line->is_blank
Truth table0%0/3
not(A) or B
A= not defined $el_panel_gridB= $el_panel_grid->is_blank
|
| 354 |
|
| range => $range, |
| 355 |
|
| zeroline => JSON::false, |
| 356 |
|
| autorange => JSON::false, |
| 357 |
|
| |
| 358 |
|
| ( |
| 359 |
|
| ( not defined $el_axis_title or $el_axis_title->is_blank ) |
| 360 |
|
| ? () |
| 361 |
|
| : ( title => $axis_title, ) |
| 362 |
|
| ), |
| 363 |
|
| ( |
| 364 |
|
| ( not defined $el_axis_ticks or $el_axis_ticks->is_blank ) |
| 365 |
|
| ? () |
| 366 |
|
| : ( |
| 367 |
|
| ticks => 'outside', |
| 368 |
|
| ticktext => $ticktext, |
| 369 |
|
| tickvals => $tickvals, |
| 370 |
|
| tickcolor => to_rgb( $el_axis_ticks->at('color') ), |
| 371 |
|
| tickangle => -( $el_axis_ticks->at('angle') // 0 ), |
| 372 |
|
| ) |
| 373 |
|
| ), |
| 374 |
|
| |
| 375 |
|
| #ticklen => $theme->axis_ticks_length; |
| 376 |
|
| #tickwidth => $el_axis_ticks, |
| 377 |
|
| ( |
| 378 |
|
| ( not defined $el_axis_text or $el_axis_text->is_blank ) |
| 379 |
|
| ? ( showticklabels => JSON::false, ) |
| 380 |
|
| : ( showticklabels => JSON::true, ) |
| 381 |
|
| ), |
| 382 |
|
| ( |
| 383 |
|
| ( not defined $el_axis_line or $el_axis_line->is_blank ) ? () |
| 384 |
|
| : ( |
| 385 |
|
| linecolor => to_rgb( $el_axis_line->at('color') ), |
| 386 |
|
| linewidth => 1, |
| 387 |
|
| ) |
| 388 |
|
| ), |
| 389 |
|
| ( |
| 390 |
|
| ( |
| 391 |
|
| not defined $el_panel_grid |
| 392 |
|
| or $el_panel_grid->is_blank |
| 393 |
|
| ) ? ( showgrid => JSON::false, ) |
| 394 |
|
| : ( |
| 395 |
|
| gridcolor => to_rgb( $el_panel_grid->at('color') ), |
| 396 |
|
| |
| 397 |
|
| # FIXME: fix this and use cex_to_px() |
| 398 |
|
| gridwidth => $el_panel_grid->at('size'), |
| 399 |
|
| ) |
| 400 |
|
| ), |
| 401 |
|
| }; |
| 402 |
|
| |
| 403 |
0 |
▶ | if ( $sc->isa('Chart::GGPlot::Scale::DiscretePosition') ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($sc->isa("Chart::GGPlot::Scale::DiscretePosition")) |
0 |
0 |
0 |
|
| 404 |
0 |
▶ | my $has_dodge = List::AllUtils::any { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
|
| 405 |
0 |
| $_->isa('Chart::GGPlot::Position::Dodge') |
| 406 |
0 |
▶ | } $layers->map( sub { $_->position } )->flatten; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
|
| 407 |
0 |
▶ | if ($has_dodge) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($has_dodge) |
0 |
0 |
0 |
|
| 408 |
0 |
| $barmode = 'dodge'; |
| 409 |
|
| } |
| 410 |
|
| } |
| 411 |
|
| } # for (qw(x y)) |
| 412 |
|
| |
| 413 |
|
| # guides |
| 414 |
0 |
| my $gdefs = $plot->guides->build( |
| 415 |
|
| $plot->scales, |
| 416 |
|
| labels => $plot->labels, |
| 417 |
|
| layers => $layers, |
| 418 |
|
| default_mapping => $plot->mapping |
| 419 |
|
| ); |
| 420 |
|
| |
| 421 |
|
| # if $gdefs is empty, then no legend is displayed. |
| 422 |
0 |
| my $global_showlegend = !!@$gdefs; |
| 423 |
|
| |
| 424 |
0 |
| my %seen_legendgroup; |
| 425 |
0 |
| for my $i ( 0 .. $#$layers ) { |
| 426 |
0 |
| my $layer = $layers->[$i]; |
| 427 |
0 |
| my $data = $plot_built->layer_data($i); |
| 428 |
0 |
| my $prestats_data = $plot_built->layer_prestats_data($i); |
| 429 |
|
| |
| 430 |
0 |
▶ | $log->debug( "data at layer $i:\n" . $data->string ) if $log->is_debug; |
Branch: 1 branch
| Branch | True | False | Total |
| if $Chart::GGPlot::Backend::Plotly::log->is_debug |
0 |
0 |
0 |
|
| 431 |
|
| |
| 432 |
0 |
| my $traces = |
| 433 |
|
| $self->layer_to_traces( $layer, $data, $prestats_data, |
| 434 |
|
| $layout, $plot ); |
| 435 |
|
| |
| 436 |
0 |
| for my $panel (@$traces) { |
| 437 |
0 |
| for my $trace (@$panel) { |
| 438 |
0 |
▶ | if ( $trace->can('showlegend') ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($trace->can("showlegend")) |
0 |
0 |
0 |
|
| 439 |
0 |
▶ | if ( not $global_showlegend ) { |
Branch: 2 branches
| Branch | True | False | Total |
| if (not $global_showlegend) { } |
0 |
0 |
0 |
| elsif ($seen_legendgroup{$trace->legendgroup}++) { } |
0 |
0 |
0 |
|
| 440 |
0 |
| $trace->showlegend(0); |
| 441 |
|
| } |
| 442 |
|
| elsif ( $seen_legendgroup{ $trace->legendgroup }++ ) { |
| 443 |
|
| |
| 444 |
|
| # for traces of same legend group, show legend for |
| 445 |
|
| # only the first one of them. |
| 446 |
0 |
| $trace->showlegend(0); |
| 447 |
|
| } |
| 448 |
|
| } |
| 449 |
|
| |
| 450 |
0 |
| $plotly->add_trace($trace); |
| 451 |
|
| } |
| 452 |
|
| |
| 453 |
0 |
▶ | if ( List::AllUtils::any { $_->$_call_if_can('showlegend') } |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
| Branch | True | False | Total |
| if (&List::AllUtils::any(sub {
$_->$Chart::GGPlot::Backend::Plotly::_call_if_can("showlegend");
}
, @$panel)) |
0 |
0 |
0 |
|
| 454 |
|
| @$panel ) |
| 455 |
|
| { |
| 456 |
0 |
| $plotly_layout{showlegend} = JSON::true; |
| 457 |
|
| |
| 458 |
|
| # legend title |
| 459 |
|
| # |
| 460 |
|
| # TODO: See if plotly will officially support legend title |
| 461 |
|
| # https://github.com/plotly/plotly.js/issues/276 |
| 462 |
0 |
| my $br = br(); |
| 463 |
|
| my $legend_titles = |
| 464 |
0 |
| join( $br, map { $_->title =~ s/\n/$br/gr; } @$gdefs ); |
| 465 |
|
| |
| 466 |
0 |
▶ | my $annotations = $plotly_layout{annotations} //= []; |
Condition0%0/2
$plotly_layout{"annotations"} //= []
MC/DC0%0/1
$plotly_layout{"annotations"} //= []
$plotly_layout{"annotations"}
Truth table0%0/2
A
A= $plotly_layout{"annotations"}
|
| 467 |
0 |
| push @$annotations, |
| 468 |
|
| { |
| 469 |
|
| x => 1.02, |
| 470 |
|
| y => 1, |
| 471 |
|
| align => 'left', |
| 472 |
|
| xanchor => 'left', |
| 473 |
|
| yanchor => 'bottom', |
| 474 |
|
| text => $legend_titles, |
| 475 |
|
| showarrow => JSON::false, |
| 476 |
|
| xref => 'paper', |
| 477 |
|
| yref => 'paper', |
| 478 |
|
| }; |
| 479 |
|
| |
| 480 |
|
| # Default right margin is too small for legend title. |
| 481 |
|
| # |
| 482 |
|
| # TODO: How to automatically calc the margin? |
| 483 |
|
| # May need to use libraries like Cairo for text width? |
| 484 |
|
| # Best if plotly can natively support legend title. |
| 485 |
0 |
| $plotly_layout{margin} = { r => 150 }; |
| 486 |
|
| } |
| 487 |
|
| } |
| 488 |
|
| } |
| 489 |
|
| |
| 490 |
|
| # Above operations already ensures for each legend group there be only |
| 491 |
|
| # one legend item. So there is no need to keep legendgroup gap, then |
| 492 |
|
| # it looks better to me compared with having the default gap. |
| 493 |
0 |
| $plotly_layout{legend} = { tracegroupgap => 0 }; |
| 494 |
|
| |
| 495 |
0 |
| $plotly_layout{hovermode} = 'closest'; |
| 496 |
0 |
▶ | $plotly_layout{barmode} = $barmode // 'relative'; |
MC/DC0%0/1
$barmode // "relative"
$barmode
|
| 497 |
|
| |
| 498 |
|
| # border |
| 499 |
0 |
| my $el_panel_border = $theme->at('panel_border'); |
| 500 |
0 |
▶ | unless ( not defined $el_panel_border or $el_panel_border->is_blank ) { |
Branch: 1 branch
| Branch | True | False | Total |
| unless (not defined $el_panel_border or $el_panel_border->is_blank) |
0 |
0 |
0 |
Condition0%0/3
not defined $el_panel_border or $el_panel_border->is_blank
MC/DC0%0/2
not defined $el_panel_border or $el_panel_border->is_blank
not defined $el_panel_border
$el_panel_border->is_blank
Truth table0%0/3
not(A) or B
A= not defined $el_panel_borderB= $el_panel_border->is_blank
|
| 501 |
|
| $plotly_layout{shapes} = [ |
| 502 |
|
| { |
| 503 |
0 |
| type => 'rect', |
| 504 |
|
| fillcolor => 'transparent', |
| 505 |
|
| line => { |
| 506 |
|
| color => to_rgb( $el_panel_border->at('color') ), |
| 507 |
|
| width => 1, |
| 508 |
|
| linetype => 'solid', |
| 509 |
|
| }, |
| 510 |
|
| xref => 'paper', |
| 511 |
|
| x0 => 0, |
| 512 |
|
| x1 => 1, |
| 513 |
|
| yref => 'paper', |
| 514 |
|
| y0 => 0, |
| 515 |
|
| y1 => 1, |
| 516 |
|
| } |
| 517 |
|
| ]; |
| 518 |
|
| } |
| 519 |
|
| |
| 520 |
0 |
▶ | if ( $theme->at('legend_position') eq 'none' ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($theme->at("legend_position") eq "none") |
0 |
0 |
0 |
|
| 521 |
0 |
| $plotly_layout{showlegend} = JSON::false; |
| 522 |
|
| } |
| 523 |
|
| |
| 524 |
|
| # colorbar |
| 525 |
|
| my ($colorbar) = |
| 526 |
0 |
| grep { $_->$_DOES('Chart::GGPlot::Guide::Colorbar') } @$gdefs; |
| 527 |
0 |
▶ | if ($colorbar) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($colorbar) |
0 |
0 |
0 |
|
| 528 |
0 |
| my $colorbar_trace = $self->_colorbar_to_trace($colorbar); |
| 529 |
0 |
| $plotly->add_trace($colorbar_trace); |
| 530 |
|
| } |
| 531 |
|
| |
| 532 |
0 |
▶ | $log->debug( "plotly layout : " . Dumper( \%plotly_layout ) ) |
Branch: 1 branch
| Branch | True | False | Total |
| if $Chart::GGPlot::Backend::Plotly::log->is_debug |
0 |
0 |
0 |
|
| 533 |
|
| if $log->is_debug; |
| 534 |
|
| |
| 535 |
0 |
| $plotly->layout( \%plotly_layout ); |
| 536 |
|
| |
| 537 |
|
| #$log->trace( "plotly html:\n" . $plotly->html ) if $log->is_trace; |
| 538 |
|
| |
| 539 |
0 |
| $plotly->{config}{responsive} = JSON::true; |
| 540 |
0 |
| return $plotly; |
| 541 |
1 |
| } |
| 542 |
|
| |
| 543 |
|
| |
| 544 |
0 |
▶ | method ggplotly ($ggplot) { |
|
Subroutine
ggplotly: not called CC=3 SCAR=24.8
Pod
documented
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for method ggplotly (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 2 and Function::Parameters::_croak('Too many arguments for method ggplotly (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
|
| 545 |
0 |
| my $plot_built = $self->build($ggplot); |
| 546 |
0 |
| return $self->_to_plotly($plot_built); |
| 547 |
1 |
| } |
| 548 |
|
| |
| 549 |
0 |
▶ | method show ($ggplot, HashRef $opts={}) { |
|
Subroutine
show: not called CC=9 SCAR=45.0
Pod
documented
Branch: 4 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for method show (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for method show (expected 3, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ < 2 and $opts = {} |
0 |
0 |
0 |
| Ref::Util::XS::is_plain_hashref($opts) or Function::Parameters::_croak('In method show: parameter 2 ($opts): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(22, 'HashRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_63; use warnings; use strict; do { ref $_[0] eq 'HASH' };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; my $type_parameter = shift(); my $check = $type_parameter->_compiled_type_constraint; return sub { foreach my $x (values %$_) { &$check($x) or return; } 1; } ;},"inline_environment" => {},"inline_generator" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; my $self = shift(); my $type_parameter = shift(); my $val = shift(); 'do {my $check = ' . $val . ';' . 'ref($check) eq "HASH" ' . '&& &List::Util::all(' . 'sub { ' . $type_parameter->_inline_check('$_') . ' }, ' . 'values %{$check}' . ')' . '}';},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'ref(' . $_[1] . ') eq "HASH"';},"name" => "HashRef","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => bless( {"Types::TypeTiny::to_TypeTiny" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","moose_type" => {},"name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_44; use warnings; use strict; do { 1 };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 1;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; '1';},"name" => "Any","package_defined_in" => "Moose::Util::TypeConstraints::Builtins"}, 'Moose::Meta::TypeConstraint' ),"name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_47; use warnings; use strict; do { defined $_[0] };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; defined $_;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'defined(' . $_[1] . ')';},"name" => "Defined","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => bless( {"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_45; use warnings; use strict; do { 1 };},"constraint" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; 1;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; '1';},"name" => "Item","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => {}}, 'Moose::Meta::TypeConstraint' )}, 'Moose::Meta::TypeConstraint' ),"name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_50; use warnings; use strict; do { ref $_[0] };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; ref $_;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'ref(' . $_[1] . ')';},"name" => "Ref","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => {}}, 'Moose::Meta::TypeConstraint' )}, 'Moose::Meta::TypeConstraint::Parameterizable' ),"my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v;$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"moose_type"} = $v->{"moose_type"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"moose_type"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"};$v->{"moose_type"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"};$v->{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}; \$v}->get_message($opts)) |
0 |
0 |
0 |
|
| 550 |
0 |
| my $plotly = $self->ggplotly($ggplot); |
| 551 |
0 |
▶ | if ( $opts->{width} or $opts->{height} ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($opts->{'width'} or $opts->{'height'}) { } |
0 |
0 |
0 |
Condition0%0/3
$opts->{"width"} or $opts->{"height"}
MC/DC0%0/2
$opts->{"width"} or $opts->{"height"}
$opts->{"width"}
$opts->{"height"}
Truth table0%0/3
A or B
A= $opts->{"width"}B= $opts->{"height"}
|
| 552 |
0 |
▶ | $plotly->{layout}{width} = $opts->{width} if ( $opts->{width} ); |
Branch: 1 branch
| Branch | True | False | Total |
| if $opts->{"width"} |
0 |
0 |
0 |
|
| 553 |
0 |
▶ | $plotly->{layout}{height} = $opts->{height} if ( $opts->{height} ); |
Branch: 1 branch
| Branch | True | False | Total |
| if $opts->{"height"} |
0 |
0 |
0 |
|
| 554 |
0 |
| $plotly->{config}{responsive} = JSON::false; |
| 555 |
|
| } |
| 556 |
|
| else { |
| 557 |
0 |
| $plotly->{config}{responsive} = JSON::true; |
| 558 |
|
| } |
| 559 |
0 |
| show_plot( $plotly ); |
| 560 |
1 |
| } |
| 561 |
|
| |
| 562 |
0 |
▶ | method save ($ggplot, $filename, HashRef $opts={}) { |
|
Subroutine
save: not called CC=6 SCAR=37.4
Pod
documented
Branch: 4 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for method save (expected 3, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 4 and Function::Parameters::_croak('Too many arguments for method save (expected 4, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ < 3 and $opts = {} |
0 |
0 |
0 |
| Ref::Util::XS::is_plain_hashref($opts) or Function::Parameters::_croak('In method save: parameter 3 ($opts): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(22, 'HashRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_63; use warnings; use strict; do { ref $_[0] eq 'HASH' };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; my $type_parameter = shift(); my $check = $type_parameter->_compiled_type_constraint; return sub { foreach my $x (values %$_) { &$check($x) or return; } 1; } ;},"inline_environment" => {},"inline_generator" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; my $self = shift(); my $type_parameter = shift(); my $val = shift(); 'do {my $check = ' . $val . ';' . 'ref($check) eq "HASH" ' . '&& &List::Util::all(' . 'sub { ' . $type_parameter->_inline_check('$_') . ' }, ' . 'values %{$check}' . ')' . '}';},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'ref(' . $_[1] . ') eq "HASH"';},"name" => "HashRef","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => bless( {"Types::TypeTiny::to_TypeTiny" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","moose_type" => {},"name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_44; use warnings; use strict; do { 1 };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 1;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; '1';},"name" => "Any","package_defined_in" => "Moose::Util::TypeConstraints::Builtins"}, 'Moose::Meta::TypeConstraint' ),"name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_47; use warnings; use strict; do { defined $_[0] };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; defined $_;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'defined(' . $_[1] . ')';},"name" => "Defined","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => bless( {"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_45; use warnings; use strict; do { 1 };},"constraint" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; 1;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; '1';},"name" => "Item","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => {}}, 'Moose::Meta::TypeConstraint' )}, 'Moose::Meta::TypeConstraint' ),"name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_50; use warnings; use strict; do { ref $_[0] };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; ref $_;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'ref(' . $_[1] . ')';},"name" => "Ref","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => {}}, 'Moose::Meta::TypeConstraint' )}, 'Moose::Meta::TypeConstraint::Parameterizable' ),"my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v;$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"moose_type"} = $v->{"moose_type"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"moose_type"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"};$v->{"moose_type"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"};$v->{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}; \$v}->get_message($opts)) |
0 |
0 |
0 |
|
| 563 |
0 |
| my $plotly = $self->ggplotly($ggplot); |
| 564 |
0 |
| my %opts = %$opts; |
| 565 |
|
| |
| 566 |
0 |
| my $good = Chart::Plotly::Image::save_image( |
| 567 |
|
| #<<< no perltidy |
| 568 |
|
| plot => $plotly, |
| 569 |
|
| file => $filename, |
| 570 |
|
| %opts, |
| 571 |
|
| #>>> |
| 572 |
|
| ); |
| 573 |
0 |
▶ | die "Failed to save image" unless $good; |
Branch: 1 branch
| Branch | True | False | Total |
| unless $good |
0 |
0 |
0 |
|
| 574 |
1 |
| } |
| 575 |
|
| |
| 576 |
0 |
▶ | method iplot ($ggplot, HashRef $opts={}) { |
|
Subroutine
iplot: not called CC=6 SCAR=37.4
Pod
documented
Branch: 4 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for method iplot (expected 2, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for method iplot (expected 3, got ' . @_ . ')') |
0 |
0 |
0 |
| @_ < 2 and $opts = {} |
0 |
0 |
0 |
| Ref::Util::XS::is_plain_hashref($opts) or Function::Parameters::_croak('In method iplot: parameter 2 ($opts): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(22, 'HashRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_63; use warnings; use strict; do { ref $_[0] eq 'HASH' };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; my $type_parameter = shift(); my $check = $type_parameter->_compiled_type_constraint; return sub { foreach my $x (values %$_) { &$check($x) or return; } 1; } ;},"inline_environment" => {},"inline_generator" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; my $self = shift(); my $type_parameter = shift(); my $val = shift(); 'do {my $check = ' . $val . ';' . 'ref($check) eq "HASH" ' . '&& &List::Util::all(' . 'sub { ' . $type_parameter->_inline_check('$_') . ' }, ' . 'values %{$check}' . ')' . '}';},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'ref(' . $_[1] . ') eq "HASH"';},"name" => "HashRef","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => bless( {"Types::TypeTiny::to_TypeTiny" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","moose_type" => {},"name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_44; use warnings; use strict; do { 1 };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 1;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; '1';},"name" => "Any","package_defined_in" => "Moose::Util::TypeConstraints::Builtins"}, 'Moose::Meta::TypeConstraint' ),"name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","moose_type" => bless( {"Types::TypeTiny::to_TypeTiny" => {},"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_47; use warnings; use strict; do { defined $_[0] };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; defined $_;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'defined(' . $_[1] . ')';},"name" => "Defined","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => bless( {"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_45; use warnings; use strict; do { 1 };},"constraint" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; 1;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; '1';},"name" => "Item","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => {}}, 'Moose::Meta::TypeConstraint' )}, 'Moose::Meta::TypeConstraint' ),"name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"_default_message" => sub { package Moose::Meta::TypeConstraint; use warnings; use strict; my $value = shift(); my $can_partialdump = &try(sub { require Devel::PartialDump; 'Devel::PartialDump'->VERSION(0.14); 1; } ); if ($can_partialdump) { $value = 'Devel::PartialDump'->new->dump($value); } else { $value = defined $value ? overload::StrVal($value) : 'undef'; } return q[Validation failed for '] . $name . "' with value $value";},"compiled_type_constraint" => sub { package Eval::Closure::Sandbox_50; use warnings; use strict; do { ref $_[0] };},"constraint" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; ref $_;},"inline_environment" => {},"inlined" => sub { package Moose::Util::TypeConstraints::Builtins; use warnings; use strict; 'ref(' . $_[1] . ')';},"name" => "Ref","package_defined_in" => "Moose::Util::TypeConstraints::Builtins","parent" => {}}, 'Moose::Meta::TypeConstraint' )}, 'Moose::Meta::TypeConstraint::Parameterizable' ),"my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v;$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"moose_type"} = $v->{"moose_type"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"}{"Types::TypeTiny::to_TypeTiny"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"moose_type"};$v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"complementary_type"}{"parent"};$v->{"moose_type"}{"parent"}{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}{"parent"}{"moose_type"};$v->{"parent"} = $v->{"moose_type"}{"parent"}{"Types::TypeTiny::to_TypeTiny"}; \$v}->get_message($opts)) |
0 |
0 |
0 |
|
| 577 |
0 |
| state $plugin_registered; |
| 578 |
0 |
▶ | unless ($plugin_registered) { |
Branch: 1 branch
| Branch | True | False | Total |
| unless ($plugin_registered) |
0 |
0 |
0 |
|
| 579 |
0 |
| IPerl->load_plugin('Chart::Plotly'); |
| 580 |
0 |
| $plugin_registered = 1; |
| 581 |
|
| } |
| 582 |
|
| |
| 583 |
0 |
| return $self->ggplotly($ggplot); |
| 584 |
1 |
| } |
| 585 |
|
| |
| 586 |
1 |
| 1; |
| 587 |
|
| |
| 588 |
|
| __END__ |