| 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 => \®ular_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
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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 12 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 12 | 1; | |||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | __END__ | ||||||||||||||||||||