WWW::CNic::Response(3pm)

WWW::CNic::Response3pm

Base class for www::cnic response objects.

Usage

        use WWW::CNic;
        my $query = WWW::CNic->new( OPTIONS );
        my $response = $query->execute();

Overview

This is the base class for all response objects returned by WWW::CNic. Each query type returns a different object, all of which inherit their basic functionality from this module.

This module should never be accessed directly, only through its children.

Methods

All the child classes of WWW::CNic::Response inherit the following methods:

        $response->is_success();

This returns true if the transaction was completed successfully. If there was a server-side error due to invalid data or a system error, or there was an HTTP error this method will return undef.

        $response->is_error();

This is the converse of "is_success". It returns true if there was an error.

        $response->error();

This returns the error message generated, if any. This can be either a server-side error message or an HTTP error.

        $response->message();

This returns the message returned when the transaction was successful.

        $response->keys();

This returns an array containing all the keys returned by the server.

        $response->response($key);

This returns the value corresponding to $key as returned by the server. This may be a scalar, or a reference to an array or hash, depending on the context.

        $response->dump();

This prints a human-readable dump of the data stored in the object to "STDOUT". Mainly useful in debugging.

Releases

7 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7–8
  6. 9

From libwww-cnic-perl 0.38-2 in Debian 9 (Stretch). Parsed by carta from the page's man source.