Perinci::Object::function - Represent function metadata
version 0.09
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
This class provides an object-oriented interface for sub spec.
Create a new object from $spec. If $spec is undef, creates an empty spec.
Get or set named feature (features key in spec). If a feature doesn't exist, undef will be returned.
Get or set argument (args key in spec). If an argument doesn't exist, undef will be returned.
Sub::Spec::Object
Steven Haryanto <stevenharyanto@gmail.com>
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.
To install Perinci::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perinci::Object
CPAN shell
perl -MCPAN -e shell install Perinci::Object
For more information on module installation, please visit the detailed CPAN module installation guide.