Data::Object::Opts

Data-Object Command-line Options

use Data::Object::Opts;

my $opts = Data::Object::Opts->new(
  args => ['--resource', 'users', '--help'],
  spec => ['resource|r=s', 'help|h'],
  named => { method => 'resource' } # optional
);

$opts->method; # $resource
$opts->get('resource'); # $resource

$opts->help; # $help
$opts->get('help'); # $help

Data::Object::Role::Stashable

Data::Object::Library

args(ArrayRef[Str], opt, ro) spec(ArrayRef[Str], opt, ro) named(HashRef, opt, ro)

This package provides an object-oriented interface to the process' command-line options.

7 POD Errors

The following errors were encountered while parsing the POD:

Around line 8:

Unknown directive: =name

Around line 12:

Unknown directive: =abstract

Around line 16:

Unknown directive: =synopsis

Around line 32:

Unknown directive: =integrates

Around line 36:

Unknown directive: =libraries

Around line 40:

Unknown directive: =attributes

Around line 46:

Unknown directive: =description