line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::RPC::Constants; |
2
|
2
|
|
|
2
|
|
762
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
73
|
|
3
|
2
|
|
|
2
|
|
886
|
use parent qw(Exporter); |
|
2
|
|
|
|
|
293
|
|
|
2
|
|
|
|
|
13
|
|
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
|
2
|
50
|
|
2
|
|
268
|
%constants = ( |
18
|
|
|
|
|
|
|
JSONRPC_DEBUG => $ENV{PERL_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
|
|
|
|
|
24
|
require constant; |
26
|
2
|
|
|
|
|
203
|
constant->import( \%constants ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |