NAME
Term::CLI::Intro - introduction to Term::CLI class/module structure
VERSION
version 0.060000
DESCRIPTION
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).
MODULE SUMMARY
Language modules
- Term::CLI::L10N
-
Localizations for Term::CLI diagnostics. Defines and exports a loc function. Based on Locale::Maketext(3p).
- Term::CLI::L10N::en
- Term::CLI::L10N::nl
-
English and Dutch language localizations, resp.
Utility modules
- Term::CLI::Util
-
Utility functions used in other modules/classes, e.g.
get_options_from_args
andis_prefix_str
.
Parser and commands
- Term::CLI::ReadLine
-
Wrapper around Term::ReadLine to provide a single, global Term::ReadLine(3p) instance.
- Term::CLI
-
CLI reader and parser class.
- Term::CLI::Base
-
Base class for Term::CLI(3p) objects.
- Term::CLI::Element
-
Base class for CLI syntax elements.
- Term::CLI::Command
-
CLI syntax element for (sub-)commands.
- Term::CLI::Command::Help
-
CLI syntax element for the
help
command.
Arguments and argument types
- Term::CLI::Argument
-
Base CLI syntax element or command line arguments.
- Term::CLI::Argument::Enum
-
CLI syntax element for arguments from a fixed set of strings.
- Term::CLI::Argument::Filename
-
CLI syntax element for file/directory name arguments.
- Term::CLI::Argument::Number
-
Base class for numeric arguments.
- Term::CLI::Argument::Number::Float
-
CLI syntax element for floating point number arguments.
- Term::CLI::Argument::Number::Int
-
CLI syntax element for integer arguments.
- Term::CLI::Argument::String
-
CLI syntax element for string arguments.
- Term::CLI::Argument::Tree
-
CLI syntax element for hierarchical (tree) arguments.
- Term::CLI::Argument::TypeTiny
-
CLI syntax element for Type::Tiny validated arguments.
Roles
- Term::CLI::Role::CommandSet
-
Methods to deal with a list of Term::CLI::Command objects.
- Term::CLI::Role::ArgumentSet
-
Methods to deal with a list of Term::CLI::Argument objects.
- Term::CLI::Role::HelpText
-
Methods to provide help text on a command.
- Term::CLI::Role::State
-
Role that helps keep a "state" hash for Term::CLI::Command and Term::CLI objects.
CLASS RELATIONSHIPS
Classes (inheritance)
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
Roles
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
Ownership
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
SEE ALSO
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).
AUTHOR
Steven Bakker <sbakker@cpan.org>
COPYRIGHT AND LICENSE
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.