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
Net::Gnats::Response(3) User Contributed Perl Documentation Net::Gnats::Response(3)

Net::Gnats::Response - A Gnats payload class.

For dealing with raw responses and error codes returned by Gnatsd. Enables an easier payload method.

0.15

  use Net::Gnats::Reponse;

  # Compose payload via constructor
  my $response = Net::Gnats::Response->new({ raw => $data,
                                             code => $code});

  # Compose disparately
  my $response = Net::Gnats::Response->new;
  $response->raw($data);
  $response->code($code);

There are two types of constructors available.

The first enables a 'shell' response which carries children responses. The shell response does not require initialization data.

The second enables the capturing a full response. When initializing the response, the code and raw data must be passed to initialization.

Constructor for the shell Response object.

 my $r = new(code => $code, raw => $raw)

The following public accessors are available. All accessors are readonly because the response class expects the raw data to be submitted during instantiation.

The readonly raw accessor retrieves raw result data for this particular response. If this is a parent response for a single payload, then it will return an empty anonymous array.

 my $r = Net::Gnats::Response( code => $code, raw => $raw );

The readonly code accessor for the result code.

 my $r = Net::Gnats::Response( code => $code, raw => $raw );
 return 1 if $r->code == Net::Gnats::CODE_OK;

The readonly accessor for fetching child responses.

The response has completed processing. Returns 1 if processing has completed, returns 0 otherwise.

Retrieve the overall status of the response. If this response, or all child responses, resulted positively then returns 1. Otherwise, it returns 0.

as_list
Assumes the Gnatsd payload response is a 'list' and parses it as so.

Returns: Anonymous array of list items from this response and all children.

as_string

None.

None.

None.

None.

None.

Richard Elberger, riche@cpan.org

License: GPL V3

(c) 2014 Richard Elberger

Hey! The above document had some coding errors, which are explained below:
Around line 184:
=begin without a target?
Around line 186:
'=item' outside of any '=over'
Around line 304:
You forgot a '=back' before '=head1'
2015-11-08 perl v5.32.1

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

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