Term::CLI::Element - generic parent class for elements in Term::CLI
version 0.04007
use Term::CLI::Element; my $arg = Term::CLI::Element->new(name => 'varname');
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.
error
term
set_error
Term::CLI::Base(3p).
None.
Create a new Term::CLI::Element object and return a reference to it.
The name attribute is required.
The Term::CLI::Element inherits from accessors and methods from Term::CLI::Base(3p).
Term::CLI::Element
In addition, it defines:
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.
Term::CLI(3p), Term::CLI::Argument(3p), Term::CLI::Base(3p), Term::CLI::Command(3p), Term::CLI::ReadLine(3p).
Steven Bakker <sbakker@cpan.org>, 2018.
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.
To install Term::CLI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Term::CLI
CPAN shell
perl -MCPAN -e shell install Term::CLI
For more information on module installation, please visit the detailed CPAN module installation guide.