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

NAME

Term::CLI::Base - generic base class for Term::CLI classes

VERSION

version 0.04007

SYNOPSIS

 package Term::CLI::Something {

    use Moo;

    extends 'Term::CLI::Base';

    ...
 };

DESCRIPTION

Generic base class for Term::CLI(3p) classes. This class provides some basic functions and attributes that all classes except Term::CLI::ReadLine share.

METHODS

Accessors

name

Element name. Can be any string, but must be specified at construction time.

error

Contains a diagnostic message in case of errors.

term

The active Term::CLI::ReadLine object.

Others

set_error ( STRING, ... )

Set the error() attribute to the concatenation of all STRING parameters and return a "failure" (undef or the empty list, depending on call context).

SEE ALSO

Term::CLI(3p), Term::CLI::Element(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.