line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::RPC::Constants; |
2
|
2
|
|
|
2
|
|
469
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
50
|
|
3
|
2
|
|
|
2
|
|
353
|
use parent qw(Exporter); |
|
2
|
|
|
|
|
204
|
|
|
2
|
|
|
|
|
9
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
6
|
|
|
|
|
|
|
JSONRPC_DEBUG |
7
|
|
|
|
|
|
|
RPC_PARSE_ERROR |
8
|
|
|
|
|
|
|
RPC_INVALID_REQUEST |
9
|
|
|
|
|
|
|
RPC_METHOD_NOT_FOUND |
10
|
|
|
|
|
|
|
RPC_INVALID_PARAMS |
11
|
|
|
|
|
|
|
RPC_INTERNAL_ERROR |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
our %EXPORT_TAGS = (all => \@EXPORT_OK); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my %constants; |
16
|
|
|
|
|
|
|
BEGIN { |
17
|
|
|
|
|
|
|
%constants = ( |
18
|
2
|
50
|
|
2
|
|
212
|
JSONRPC_DEBUG => $ENV{JSONRPC_DEBUG} ? 1 : 0, |
19
|
|
|
|
|
|
|
RPC_PARSE_ERROR => -32700, |
20
|
|
|
|
|
|
|
RPC_INVALID_REQUEST => -32600, |
21
|
|
|
|
|
|
|
RPC_METHOD_NOT_FOUND => -32601, |
22
|
|
|
|
|
|
|
RPC_INVALID_PARAMS => -32602, |
23
|
|
|
|
|
|
|
RPC_INTERNAL_ERROR => -32603, |
24
|
|
|
|
|
|
|
); |
25
|
2
|
|
|
|
|
11
|
require constant; |
26
|
2
|
|
|
|
|
148
|
constant->import( \%constants ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |