NAME

Term::CLI::Element - generic parent class for elements in Term::CLI

VERSION

version 0.04008

SYNOPSIS

 use Term::CLI::Element;

 my $arg = Term::CLI::Element->new(name => 'varname');

DESCRIPTION

Generic parent class for command line elements in Term::CLI(3p). This is used by Term::CLI::Command(3p) and Term::CLI::Argument(3p) to provide basic, shared functionality.

This class inherits from Term::CLI::Base(3p) to provide the error, term, and set_error methods.

CLASS STRUCTURE

Inherits from:

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

Consumes:

None.

CONSTRUCTORS

new ( name => VARNAME ... )

Create a new Term::CLI::Element object and return a reference to it.

The name attribute is required.

METHODS

The Term::CLI::Element inherits from accessors and methods from Term::CLI::Base(3p).

In addition, it defines:

complete ( STR )

Return a list of strings that are possible completions for value. By default, this method returns an empty list.

Sub-classes should probably override this.

SEE ALSO

Term::CLI(3p), Term::CLI::Argument(3p), Term::CLI::Base(3p), Term::CLI::Command(3p), Term::CLI::ReadLine(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.