RPC/Constants.pm

filter: Statementstmt 100% 13 / 13 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 94.4% 17 / 18 CC 2 SCAR 4.2
CC
2
Cov
93%
BEGIN
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« RPC/Legacy.pm ↑ Summary RPC/Procedure.pm »
1 package JSON::RPC::Constants;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use parent qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 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 2 our %EXPORT_TAGS = (all => \@EXPORT_OK);
14  
15 2 my %constants;
16 2 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.1
17 %constants = (
18 2 ▶ JSONRPC_DEBUG => $ENV{PERL_JSONRPC_DEBUG} ? 1 : 0,
Branch: 1 branch
BranchTrueFalseTotal
$ENV{'PERL_JSONRPC_DEBUG'} ? : 0 2 2
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 require constant;
26 2 constant->import( \%constants );
27 }
28  
29 2 1;
30  
31 __END__
« RPC/Legacy.pm ↑ Summary RPC/Procedure.pm »