The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Haineko::CLI::Help - Class for displaying help message

DESCRIPTION

Haineko::CLI::Help provide methods for displaying help messages of each command or each class.

SYNOPSIS

    use Haineko::CLI::Help;
    my $d = Haineko::CLI::Help->new();

    $d->add( Haineko::CLI::Daemon->help('o'), 'option' );
    $d->add( Haineko::CLI::Daemon->help('s'), 'subcommand' );
    $d->add( [ 'Command example' ], 'example' );
    $d->mesg();

CLASS METHODS

new()

new() is a constructor of Haineko::CLI::Help.

    use Haineko::CLI::Help;
    my $d = Haineko::CLI::Help->new();

INSTANCE METHODS

mesg()

mesg() print help messages to STDERR.

    $d->add( Haineko::CLI::Daemon->help('o'), 'option' );
    $d->add( Haineko::CLI::Daemon->help('s'), 'subcommand' );
    $d->add( [ 'Command example' ], 'example' );
    $d->mesg();

add( [Messages], type )

add() method add help messages into the object. The first argument should be an array reference, the second argument should be 'option' or subcommand or 'example'.

parseoptions()

parseoptions() method parse options given at command line and returns the value of run-mode.

help()

help() prints help message of Haineko::CLI::Help for command line.

SEE ALSO

REPOSITORY

https://github.com/azumakuniyuki/Haineko

AUTHOR

azumakuniyuki <perl.org [at] azumakuniyuki.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.