JSON::RPC::Common::Procedure::Return man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

JSON::RPC::Common::ProUserrContributed)JSON::RPC::Common::Procedure::Return(3)

NAME
       JSON::RPC::Common::Procedure::Return - JSON-RPC procedure return class

SYNOPSIS
	       use JSON::RPC::Common::Procedure::Return;

	       # create a return from a call, retaining the ID
	       my $return = $call->return_result("foo");

	       # inflate gets a version specific class
	       my $return = JSON::RPC::Common::Procedure::Return->inflate(
		       version => "2.0",
		       result  => "foo",
		       id      => $id,
	       );

	       # you can specify a return with an error, it's just an attribute
	       my $return = JSON::RPC::Common::Procedure::Return->new(
		       error => ...,
	       );

DESCRIPTION
       This class abstracts JSON-RPC procedure returns (results).

       Version specific implementation are provided as well.

ATTRIBUTES
       id  The ID of the call this is a result for.

	   Results with no ID are typically error results for parse fails,
	   when the call ID could never be determined.

       result
	   The JSON data that is the result of the call, if any.

       error
	   The error, if any. This is a
	   JSON::RPC::Common::Procedure::Return::Error object (or a version
	   specific subclass).

       error_class
	   The error class to use when instantiating errors.

METHODS
       inflate
       deflate
	   Go to and from JSON data.

       inflate_error
       deflate_error
	   Helpers for managing the error sub object.

       set_error
	   Calls "create_error" with it's arguments and sets the error to
	   that.

	   E.g.

		   $res->set_error("foo");
		   $res->error->message; # "foo"

       create_error
	   Instantiate a new error of class error_class using "new_dwim" in
	   JSON::RPC::Common::Procedure::Return::Error.

perl v5.14.1			  2009-JSON::RPC::Common::Procedure::Return(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net