Actions Status MetaCPAN Release

NAME

Getopt::EX::Hashed - Hash store object automation

SYNOPSIS

use App::foo;
App::foo->new->run();

package App::foo;

use Getopt::EX::Hashed;
has start => ( spec => "=i s begin", default => 1 );
has end   => ( spec => "=i e" );
no  Getopt::EX::Hashed;

sub run {
    my $app = shift;
    $app->getopt or pod2usage();
    if ($app->{start}) {
        ...

DESCRIPTION

Getopt::EX::Hashed is a module to automate a hash object to store command line option values. Major objective of this module is to integrate initialization and specification into single place. Module name shares Getopt::EX, but it works independently from other modules included in Getopt::EX, so far.

In the current implementation, using Getopt::Long, or compatible module such as Getopt::EX::Long is assumed. It is configurable, but no other module is supported now.

FUNCTION

has

Declare option parameters in a form of:

has option_name => ( param => value, ... );

If array reference is given, multiple names can be declared at once.

has [ 'left', 'right' ] => ( param => value, ... );

If the name start with plus (+), given parameters are added to current value.

has '+left' => ( default => 1 );

Following parameters are available.

METHOD

SEE ALSO

Getopt::Long

Getopt::EX

AUTHOR

Kazumasa Utashiro

COPYRIGHT

The following copyright notice applies to all the files provided in this distribution, including binary files, unless explicitly noted otherwise.

Copyright 2021 Kazumasa Utashiro

LICENSE

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