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

NAME

Term::CLI::Argument::Enum - class for "enum" string arguments in Term::CLI

VERSION

version 0.03001

SYNOPSIS

 use Term::CLI::Argument::Enum;

 my $arg = Term::CLI::Argument::Enum->new(
     name => 'arg1',
     value_list => [qw( foo bar baz )],
 );

DESCRIPTION

Class for "enum" string arguments in Term::CLI(3p).

This class inherits from the Term::CLI::Argument(3p) class.

CLASS STRUCTURE

Inherits from:

Term::CLI::Argument(3p).

Consumes:

None.

CONSTRUCTORS

new ( name => STRING, value_list => ARRAYREF )

See also Term::CLI::Argument(3p). The value_list argument is mandatory.

ACCESSORS

See also Term::CLI::Argument(3p).

value_list

A reference to a list of valid values for the argument.

METHODS

See also Term::CLI::Argument(3p).

The following methods are added or overloaded:

validate
complete

SEE ALSO

Term::CLI::Argument(3p), Term::CLI(3p).

AUTHOR

Steven Bakker <sbakker@cpan.org>, 2018.

COPYRIGHT AND LICENSE

Copyright (c) 2018 Steven Bakker

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perldoc perlartistic."

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.