GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  JSON::RPC::LEGACY::PROCEDURE (3)

.ds Aq ’

NAME

JSON::RPC::Legacy::Procedure - JSON-RPC Service attributes

CONTENTS

SYNOPSIS



 package MyApp;

 use base (JSON::RPC::Legacy::Procedure);

 sub sum : Public {
     my ($s, @arg) = @_;
     return $arg[0] + $arg[1];
 }

 # or

 sub sum : Public(a, b) {
     my ($s, $obj) = @_;
     return $obj->{a} + $obj->{b};
 }

 # or

 sub sum : Number(a:num, b:num) {
     my ($s, $obj) = @_;
     return $obj->{a} + $obj->{b};
 }

 # private method cant be called by clients

 sub _foobar : Private {
     # ...
 }



DESCRIPTION

Using this module, you can write a subroutine with a special attribute.

Currently, in below attributes, only Public and Private are available. Others are same as Public.
Public Means that a client can call this procedure.
Private Means that a client can’t call this procedure.
Arr Means that its return values is an array object.
Obj Means that its return values is a member object.
Bit
Bool Means that a return values is a true or false.
Num Means that its return values is a number.
Str Means that its return values is a string.
Nil
None Means that its return values is a null.

TODO

Auto Service Description
Type check

SEE ALSO

<http://json-rpc.org/wd/JSON-RPC-1-1-WD-20060807.html>

AUTHOR

Makamaka Hannyaharamitu, <makamaka[at]cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007 by Makamaka Hannyaharamitu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 JSON::RPC::LEGACY::PROCEDURE (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.