|
NAMENet::Gnats::Response - A Gnats payload class.DESCRIPTIONFor dealing with raw responses and error codes returned by Gnatsd. Enables an easier payload method.VERSION0.15SYNOPSISuse 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); CONSTRUCTORSThere 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. newConstructor for the shell Response object.my $r = new(code => $code, raw => $raw) ACCESSORSThe following public accessors are available. All accessors are readonly because the response class expects the raw data to be submitted during instantiation.rawThe 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 ); codeThe 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; inner_responsesThe readonly accessor for fetching child responses.is_finishedThe response has completed processing. Returns 1 if processing has completed, returns 0 otherwise.statusRetrieve the overall status of the response. If this response, or all child responses, resulted positively then returns 1. Otherwise, it returns 0.METHODS
INCOMPATIBILITIESNone.SUBROUTINES/METHODSBUGS AND LIMITATIONSNone.CONFIGURATION AND ENVIRONMENTNone.DEPENDENCIESNone.DIAGNOSTICSNone.AUTHORRichard Elberger, riche@cpan.orgLICENSE AND COPYRIGHTLicense: GPL V3(c) 2014 Richard Elberger POD ERRORSHey! The above document had some coding errors, which are explained below:
Visit the GSP FreeBSD Man Page Interface. |