Term::CLI::Intro - introduction to Term::CLI class/module structure
version 0.059000
This manual entry provides information on the class and module structure of the Term::CLI(3p) library.
For an introduction in the usage of this library, including code examples, see Term::CLI::Tutorial(3p).
Localizations for Term::CLI diagnostics. Defines and exports a loc function. Based on Locale::Maketext(3p).
English and Dutch language localizations, resp.
Utility functions used in other modules/classes, e.g. get_options_from_args and is_prefix_str.
get_options_from_args
is_prefix_str
Wrapper around Term::ReadLine to provide a single, global Term::ReadLine(3p) instance.
CLI reader and parser class.
Base class for Term::CLI(3p) objects.
Base class for CLI syntax elements.
CLI syntax element for (sub-)commands.
CLI syntax element for the help command.
help
Base CLI syntax element or command line arguments.
CLI syntax element for arguments from a fixed set of strings.
CLI syntax element for file/directory name arguments.
Base class for numeric arguments.
CLI syntax element for floating point number arguments.
CLI syntax element for integer arguments.
CLI syntax element for string arguments.
CLI syntax element for hierarchical (tree) arguments.
CLI syntax element for Type::Tiny validated arguments.
Methods to deal with a list of Term::CLI::Command objects.
Methods to deal with a list of Term::CLI::Argument objects.
Methods to provide help text on a command.
Role that helps keep a "state" hash for Term::CLI::Command and Term::CLI objects.
X ---> Y
Y inherits from X
Term::ReadLine | +--> Term::CLI::ReadLine Term::CLI::Base | +--> Term::CLI | +--> Term::CLI::Element | +--> Term::CLI::Command | | | +--> Term::CLI::Command::Help | +--> Term::CLI::Argument | +--> Term::CLI::Argument::Bool | +--> Term::CLI::Argument::Enum | +--> Term::CLI::Argument::Filename | +--> Term::CLI::Argument::Number | | | +--> Term::CLI::Argument::Number::Int | | | +--> Term::CLI::Argument::Number::Float | +--> Term::CLI::Argument::String | +--> Term::CLI::Argument::Tree | +--> Term::CLI::Argument::TypeTiny
X consumes Y
Term::CLI ---> Term::CLI::Role::CommandSet \ +---> Term::CLI::Role::State Term::CLI::Command ---> Term::CLI::Role::CommandSet \ \ \ \ \ +---> Term::CLI::Role::ArgumentSet \ \ \ +---> Term::CLI::Role::HelpText \ +---> Term::CLI::Role::State
X ---< Y
X owns (possibly multiple) Y (i.e. "one to many").
X --- Y
X owns at most one Y (i.e. "one to one").
+----- Term::CLI::ReadLine / Term::CLI \ +----< Term::CLI::Command +----- Term::CLI::ReadLine / Term::CLI::Command ---< Term::CLI::Argument \ +----< Term::CLI::Command
Term::CLI::Tutorial(3p).
Term::CLI(3p), Term::CLI::Command(3p), Term::CLI::L10N(3p), Term::CLI::L10N::en(3p), Term::CLI::L10N::nl(3p), Term::ReadLine(3p).
Term::CLI::Argument(3p), Term::CLI::Argument::Bool(3p), Term::CLI::Argument::Enum(3p), Term::CLI::Argument::FileName(3p), Term::CLI::Argument::Number(3p), Term::CLI::Argument::Number::Float(3p), Term::CLI::Argument::Number::Int(3p), Term::CLI::Argument::String(3p), Term::CLI::Argument::Tree(3p), Term::CLI::Argument::TypeTiny(3p).
Term::CLI::Role::ArgumentSet(3p), Term::CLI::Role::CommandSet(3p), Term::CLI::Role::State(3p).
Steven Bakker <sbakker@cpan.org>
Copyright (c) 2022 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.