ExtDirect/Serialize.pm

filter: Statementstmt 60.0% 12 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 60.0% 15 / 25 CC 1 SCAR 2.2
CC
1
Cov
60%
serialize
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« ExtDirect/Test/Pkg/Bar.pm ↑ Summary ExtDirect/Test/Pkg/Hooks.pm »
1 #
2 # WARNING: This package is deprecated.
3 #
4 # See RPC::ExtDirect::Config perldoc for the description
5 # of the instance-based configuration options to be used
6 # instead of the former global variables in this package.
7 #
8  
9 package RPC::ExtDirect::Serialize;
10  
11 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶no warnings 'uninitialized'; ## no critic
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 ### PACKAGE GLOBAL VARIABLE ###
16 #
17 # Turn on for debugging
18 #
19 # DEPRECATED. Use `debug_serialize` or `debug` Config options instead.
20 #
21  
22 1 our $DEBUG;
23  
24 ### PACKAGE GLOBAL VARIABLE ###
25 #
26 # Set Exception class name so it could be configured
27 #
28 # DEPRECATED. Use `exception_class_serialize` or `exception_class`
29 # Config options instead.
30 #
31  
32 1 our $EXCEPTION_CLASS;
33  
34 ### PUBLIC CLASS METHOD ###
35 #
36 # Serialize the passed data into JSON form
37 #
38 # DEPRECATED. Use RPC::ExtDirect::Serializer->serializer instance method
39 # instead.
40 #
41  
42 sub serialize {
43 # Class name
44 0 ▶ shift;
Subroutine serialize: not called CC=1 SCAR=6.9
Pod undocumented
45
46 0 my $mute_exceptions = shift;
47
48 0 warn __PACKAGE__.'->serialize class method is deprecated; ' .
49 'use RPC::ExtDirect::Serializer->serialize ' .
50 'instance method instead';
51
52 0 require RPC::ExtDirect::Config;
53 0 require RPC::ExtDirect::Serializer;
54
55 0 my $config = RPC::ExtDirect::Config->new();
56 0 my $serializer = RPC::ExtDirect::Serializer->new( config => $config );
57
58 0 return $serializer->serialize(
59 mute_exceptions => $mute_exceptions,
60 data => [ @_ ],
61 );
62 }
63  
64 1 1;
« ExtDirect/Test/Pkg/Bar.pm ↑ Summary ExtDirect/Test/Pkg/Hooks.pm »