blib/lib/Math/Histogram/Axis.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 63.3% 19 / 30 SCAR 8.2
CC
2
Cov
59%
deserialize
6.0
serialize
2.0
BEGIN
1.0
CRAP 2.3
« blib/lib/Math/Histogram.pm ↑ Summary Histogram.xs »
1 package Math::Histogram::Axis;
2 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use Math::Histogram ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use JSON::XS ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # rest of implementation in C, see XS.xs and mh_axis.h
8  
9 sub serialize {
10 0 ▶ my $self = shift;
Subroutine serialize: not called CC=1 SCAR=6.9
Pod documented
11 0 my $hash = $self->_as_hash;
12 0 return JSON::XS::encode_json($hash);
13 }
14  
15 sub deserialize {
16 0 ▶ my $class = shift;
Subroutine deserialize: not called CC=2 SCAR=17.9
Pod documented
17 0 ▶ my $hash = JSON::XS::decode_json(ref($_[0]) ? ${$_[0]} : $_[0]);
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
18 0 return $class->_from_hash($hash);
19 }
20  
21  
22  
23  
24 7 1;
25  
26 __END__
« blib/lib/Math/Histogram.pm ↑ Summary Histogram.xs »