NAME
Net::Gnats::Response - A Gnats payload class.
VERSION
0.11
DESCRIPTION
For dealing with raw responses and error codes returned by Gnatsd. Enables an easier payload method.
SYNOPSIS
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);
INCOMPATIBILITIES
None.
SUBROUTINES/METHODS
- new()
-
Constructor for the Response object.
- raw()
-
Accessor for raw result data.
- $response->code()
-
Accessor for the result code.
- $response->as_list()
-
Assumes the Gnatsd payload response is a 'list' and parses it as so.
Returns: Anonymous array of list items.
- $response->as_string()
DIAGNOSTICS
None.
BUGS AND LIMITATIONS
None.
CONFIGURATION AND ENVIRONMENT
None.
DEPENDENCIES
None.
AUTHOR
Richard Elberger, riche@cpan.org
LICENSE AND COPYRIGHT
License: GPL V3
(c) 2014 Richard Elberger