NAME

Sub::Spec::Object - Object-oriented interface for sub/spec/request/response/etc

VERSION

version 0.04

SYNOPSIS

use Sub::Spec::Object;

my $ssres = ssres [200, "OK", [1, 2, 3]];
print $ssres->is_success, # 1
      $ssres->status,     # 200
      $ssres->message,    # "OK"
      $ssres->result;     # [1, 2, 3]

# TODO: ssspec
$SPEC{foo} = { features => { undo=>1 } };
my $ssspec = ssspec $SPEC{foo};
my $ssspec->feature('undo');    # 1
my $ssspec->feature('dry_run'); # ""

# TODO: ssreq
# TODO: sssub

DESCRIPTION

NOTICE: This module and the Sub::Spec standard is deprecated as of Jan 2012. Rinci is the new specification to replace Sub::Spec, it is about 95% compatible with Sub::Spec, but corrects a few issues and is more generic. Rias is the Perl implementation for Rinci and many of its modules can handle existing Sub::Spec sub specs. Rias::Object is the replacement for Sub::Spec::Object.

Sub::Spec works using pure data structures, but sometimes it's convenient to have an object-oriented interface for those data. This module provides just that.

FUNCTIONS

ssreq $req => OBJECT

Exported by default. A shortcut for Sub::Spec::Object::Request->new($req).

ssres $res => OBJECT

Exported by default. A shortcut for Sub::Spec::Object::Response->new($res).

ssspec $spec => OBJECT

Exported by default. A shortcut for Sub::Spec::Object::Spec->new($spec).

sssub $sub => OBJECT

Exported by default. A shortcut for Sub::Spec::Object::Sub->new($sub).

SEE ALSO

Sub::Spec

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 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.