NAME

Term::CLI::Intro - introduction to Term::CLI class structure

VERSION

version 0.04008

DESCRIPTION

This manual entry provides information on the class structure of the Term::CLI classes.

For an introduction in the usage of this library, including code examples, see Term::CLI::Tutorial(3p).

CLASS SUMMARY

Classes

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.

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.

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.

CLASS RELATIONSHIPS

Classes

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::String
                        |
                        +--> Term::CLI::Argument::Filename
                        |
                        +--> Term::CLI::Argument::Enum
                        |
                        +--> Term::CLI::Argument::Number
                                |
                                +--> Term::CLI::Argument::Number::Int
                                |
                                +--> Term::CLI::Argument::Number::Float

Roles

X ---> Y

X consumes Y

    Term::CLI -----------+
                          \
                           +---> Term::CLI::Role::CommandSet
                          /
    Term::CLI::Command --+
              \     \
               \     +---> Term::CLI::Role::ArgumentSet
                \
                 +---> Term::CLI::Role::HelpText

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::Argument(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::Command(3p), Term::CLI::Role::CommandSet(3p), Term::CLI::Role::ArgumentSet(3p), Term::ReadLine(3p).

AUTHOR

Steven Bakker <sbakker@cpan.org>

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.