Chart/GGPlot/Scale/ContinuousIdentity.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Chart::GGPlot::Scale::ContinuousIdentity;
2  
3 # ABSTRACT: Continuous identity scale
4  
5 use Chart::GGPlot::Class qw(:pdl);
6 use namespace::autoclean;
7  
8 our $VERSION = '0.002003'; # VERSION
9  
10 use Chart::GGPlot::Util qw(:all);
11  
12 extends qw(
13 Chart::GGPlot::Scale::Continuous
14 );
15  
16 method map_to_limits ( $p, $limits = $self->get_limits ) {
17 if (is_factor($p)) {
18 return as_character($p);
19 } else {
20 return $p;
21 }
22 }
23  
24 around train ($p) {
25 return if $self->guide eq 'none';
26 return $self->$orig($p);
27 }
28  
29 __PACKAGE__->meta->make_immutable;
30  
31 1;
32  
33 __END__