line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebApp::Helpers::JsonEncoder; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
15449
|
use strict; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
125
|
|
4
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
78
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
2254
|
use JSON::MaybeXS qw(JSON); |
|
2
|
|
|
|
|
16376
|
|
|
2
|
|
|
|
|
138
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1242
|
use Moo::Role; |
|
2
|
|
|
|
|
40578
|
|
|
2
|
|
|
|
|
22
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = "0.01"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has _json_encoder => ( |
14
|
|
|
|
|
|
|
is => 'ro', |
15
|
|
|
|
|
|
|
lazy => 1, |
16
|
|
|
|
|
|
|
builder => '_build_json_encoder', |
17
|
|
|
|
|
|
|
handles => { |
18
|
|
|
|
|
|
|
encode_json => 'encode', |
19
|
|
|
|
|
|
|
decode_json => 'decode', |
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
); |
22
|
2
|
|
|
2
|
|
1197
|
sub _build_json_encoder { JSON->new->utf8(1); } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
1
|
50
|
|
1
|
1
|
12274
|
sub json_bool { $_[1] ? JSON->true : JSON->false } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
__END__ |