line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Histogram::Axis; |
2
|
7
|
|
|
7
|
|
24
|
use strict; |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
220
|
|
3
|
7
|
|
|
7
|
|
27
|
use warnings; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
193
|
|
4
|
7
|
|
|
7
|
|
27
|
use Math::Histogram (); |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
198
|
|
5
|
7
|
|
|
7
|
|
26
|
use JSON::XS (); |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
800
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# rest of implementation in C, see XS.xs and mh_axis.h |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub serialize { |
10
|
2
|
|
|
2
|
1
|
53207
|
my $self = shift; |
11
|
2
|
|
|
|
|
11
|
my $hash = $self->_as_hash; |
12
|
2
|
|
|
|
|
56
|
return JSON::XS::encode_json($hash); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub deserialize { |
16
|
4
|
|
|
4
|
1
|
986
|
my $class = shift; |
17
|
4
|
50
|
|
|
|
55
|
my $hash = JSON::XS::decode_json(ref($_[0]) ? ${$_[0]} : $_[0]); |
|
0
|
|
|
|
|
0
|
|
18
|
4
|
|
|
|
|
30
|
return $class->_from_hash($hash); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |