Lite/Request.pm

filter: Statementstmt 38.8% 7 / 18 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod 100% 4 / 4 totaltotal 38.2% 13 / 34 CC 4 SCAR 14.9
CC
4
Cov
29%
Method
6.0
Params
6.0
Id
6.0
CRAP 4.4
« Lite/MessageQuantizer.pm ↑ Summary Lite/Response.pm »
1 package RPC::Lite::Request;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use RPC::Lite::Notification;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =pod
7  
8 =head1 NAME
9  
10 RPC::Lite::Request -- encapsulates and RPC::Lite request.
11  
12 =head1 DESCRIPTION
13  
14 RPC::Lite::Request is the container for RPC::Lite requests.
15  
16 =head1 METHODS
17  
18 =over 4
19  
20 =cut
21  
22 =pod
23  
24 =item C<new( $methodName, $parameterArrayReference )>
25  
26 Creates a new RPC::Lite::Request object. Takes the method name
27 and a reference to an array of parameters for the method.
28  
29 =cut
30  
31 sub new
32 0 ▶{
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
33 0 my ( $class, $method, $params ) = @_;
34  
35 0 my $self = bless {}, $class;
36  
37 0 $self->Method($method);
38 0 $self->Params($params);
39  
40 0 return $self;
41 }
42  
43 =pod
44  
45 =item C<Method( [$methodName] )>
46  
47 Sets/gets the method name.
48  
49 =cut
50  
51 0 ▶sub Method { $_[0]->{method} = $_[1] if @_ > 1; $_[0]->{method} }
Subroutine Method: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 0 0
52  
53 =pod
54  
55 =item C<Params( [$parameterArrayReference] )>
56  
57 Sets/gets the parameter array reference.
58  
59 =cut
60  
61 0 ▶sub Params { $_[0]->{params} = $_[1] if @_ > 1; $_[0]->{params} }
Subroutine Params: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 0 0
62  
63 =pod
64  
65 =item C<Id( [$id] )>
66  
67 Sets/gets the request id which is used for asynchronous calls.
68  
69 =cut
70  
71 0 ▶sub Id { $_[0]->{id} = $_[1] if @_ > 1; $_[0]->{id} }
Subroutine Id: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 0 0
72  
73 =pod
74  
75 =back
76  
77 =cut
78  
79 3 1;
« Lite/MessageQuantizer.pm ↑ Summary Lite/Response.pm »