Chart/GGPlot/Trans.pm

filter: Statementstmt 83.7% 31 / 37 Branchbran 0.0% 0 / 4 Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 90.0% 9 / 10 Podpod 0.0% 0 / 1 totaltotal 73.6% 42 / 57 CC 4 SCAR 11.6
CC
4
Cov
75%
print
9.8
__ANON__
2.0
__ANON__
1.0
CRAP 3.2
« Chart/GGPlot/Range/Continuous.pm ↑ Summary Chart/GGPlot/Stat.pm »
1 package Chart::GGPlot::Trans;
2  
3 # ABSTRACT: Transformation class
4  
5 12 ▶use Chart::GGPlot::Class qw(:pdl);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 ▶use Types::Standard qw(Str CodeRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 12 ▶use Types::PDL -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 12 ▶use Chart::GGPlot::Util qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 12 our $VERSION = '0.002003'; # VERSION
14  
15  
16 12 has name => ( is => 'ro', isa => Str, required => 1 );
17 12 has transform => ( is => 'ro', isa => CodeRef, required => 1 );
18 12 has inverse => ( is => 'ro', isa => CodeRef, required => 1 );
19 has breaks => (
20 is => 'ro',
21 isa => CodeRef,
22 57 ▶ default => sub { extended_breaks() },
Subroutine __ANON__: called CC=1 SCAR=0.0
23 12 );
24 12 has minor_breaks => (
25 is => 'ro',
26 isa => CodeRef,
27 default => \&regular_minor_breaks,
28 );
29 has format => (
30 is => 'ro',
31 isa => CodeRef,
32 89 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
33 13 ▶ sub {
Subroutine __ANON__: called CC=2 SCAR=7.1
34 13 my ($x) = @_;
35 13 ▶ return ( $x->$_call_if_can('names') // $x );
Condition66%2/3
$x->$Chart::GGPlot::Trans::_call_if_can("names") // $x
l!l&&r!l&&!r
2110
MC/DC0%0/2
$x->$Chart::GGPlot::Trans::_call_if_can("names") // $x
$x->$Chart::GGPlot::Trans::_call_if_can("names") $x
Truth table66%2/3
A // B
A= $x->$Chart::GGPlot::Trans::_call_if_can("names")B= $x
ABresult
1X1
011
000
36 }
37 89 },
38 12 );
39 has domain => (
40 is => 'ro',
41 isa => Piddle,
42 81 ▶ default => sub { pdl([qw{-inf inf}]) },
Subroutine __ANON__: called CC=1 SCAR=0.0
43 12 );
44  
45 0 ▶method print () { "Transformer: @{[$self->name]}\n"; }
Subroutine print: not called CC=3 SCAR=22.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for method print (expected 1, got ' . @_ . ')') 0 0 0
@_ > 1 and Function::Parameters::_croak('Too many arguments for method print (expected 1, got ' . @_ . ')') 0 0 0
46  
47 12 __PACKAGE__->meta->make_immutable;
48  
49 12 1;
50  
51 __END__
« Chart/GGPlot/Range/Continuous.pm ↑ Summary Chart/GGPlot/Stat.pm »