line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::XS::Sugar; |
2
|
2
|
|
|
2
|
|
45428
|
use base qw(Exporter); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
175
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: sugar for using JSON::XS |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# right now the XS won't work on anything before this |
7
|
2
|
|
|
2
|
|
36
|
use 5.014000; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
51
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
70
|
|
10
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
64
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
936
|
use Devel::CallChecker 0.003 (); |
|
2
|
|
|
|
|
44786
|
|
|
2
|
|
|
|
|
79
|
|
13
|
2
|
|
|
2
|
|
1119
|
use Types::Serialiser; |
|
2
|
|
|
|
|
7061
|
|
|
2
|
|
|
|
|
107
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our @EXPORT_OK; |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
2
|
|
12
|
use constant JSON_TRUE => Types::Serialiser::true; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5
|
|
20
|
|
|
|
|
|
|
push @EXPORT_OK, qw(JSON_TRUE); |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
173
|
use constant JSON_FALSE => Types::Serialiser::false; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
5
|
|
23
|
|
|
|
|
|
|
push @EXPORT_OK, qw(JSON_FALSE); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
## no critic (Subroutines::ProhibitSubroutinePrototypes) |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub json_truth($) { |
28
|
4
|
100
|
|
4
|
1
|
1295
|
return $_[0] ? JSON_TRUE : JSON_FALSE; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
push @EXPORT_OK, qw(json_truth); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
push @EXPORT_OK, qw( |
33
|
|
|
|
|
|
|
json_number |
34
|
|
|
|
|
|
|
json_string |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# load json_number, json_string from XS |
38
|
|
|
|
|
|
|
require XSLoader; |
39
|
|
|
|
|
|
|
XSLoader::load( __PACKAGE__, $VERSION ); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |