| 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
| |||||||||||
| 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
| |||||||||||
| 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
| |||||||||||
| 72 | |||||||||||
| 73 | =pod | ||||||||||
| 74 | |||||||||||
| 75 | =back | ||||||||||
| 76 | |||||||||||
| 77 | =cut | ||||||||||
| 78 | |||||||||||
| 79 | 3 | 1; | |||||||||