The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Perinci::Object::function - Represent function metadata

VERSION

version 0.09

SYNOPSIS

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

 $SPEC{foo} = {
     spec_version=>1.1,
     args => { b => {schema=>'int'} },
     features => {undo=>1},
 };
 my $ssspec = ssspec $SPEC{foo};
 print $ssres->feature('undo'), # 1
       $ssres->arg('a');        # undef

DESCRIPTION

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

METHODS

new($spec) => OBJECT

Create a new object from $spec. If $spec is undef, creates an empty spec.

$ssspec->feature(NAME[, VALUE])

Get or set named feature (features key in spec). If a feature doesn't exist, undef will be returned.

$ssres->arg(NAME[, VALUE])

Get or set argument (args key in spec). If an argument doesn't exist, undef will be returned.

SEE ALSO

Sub::Spec::Object

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.