Term::CLI::Base - generic base class for Term::CLI classes
version 0.058002
package Term::CLI::Something { use Moo; extends 'Term::CLI::Base'; ... };
Generic base class for Term::CLI(3p) classes. This class provides some basic functions and attributes that all classes except Term::CLI::ReadLine share.
Contains a diagnostic message in case of errors.
Element name. Can be any string, but must be specified at construction time.
The active Term::CLI::ReadLine object.
Set the error() attribute to the empty string and return 1.
Return a reference to the object that "owns" this object. This is will be an instance of a class that inherits from Term::CLI::Element, or undef.
Term::CLI::Element
undef
Walks the parent chain until it can go no further. Returns a reference to the object at the top. In a functional setup this is expected to be a Term::CLI(3p) object instance.
Sets the error() attribute to the concatenation of all STRING parameters. If no arguments are given, or the first argument is undef, the error field is cleared (see set_error below).
Always returns a "failure" (undef or the empty list, depending on call context).
Term::CLI(3p), Term::CLI::Element(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.