NAME

Sub::Spec::Object::Response - Represent sub response

VERSION

version 0.01

SYNOPSIS

use Sub::Spec::Object::Response;

my $ssres = Sub::Spec::Object::Response->new([200, "OK", [1, 2, 3]]);
print $ssres->is_success, # 1
      $ssres->status,     # 200
      $ssres->message,    # "OK"
      $ssres->result;     # [1, 2, 3]

DESCRIPTION

This class provides an object-oriented interface for sub response.

METHODS

new($res) => OBJECT

Create a new object from $res response data.

$ssres->status

Get or set status.

$ssres->message

Get or set message.

$ssres->is_success

True if status is between 200-299.

SEE ALSO

Sub::Spec::Object

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.