Haineko::CLI::Help - Class for displaying help message
Haineko::CLI::Help provide methods for displaying help messages of each command or each class.
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();
new()
new()
is a constructor of Haineko::CLI::Help.
use Haineko::CLI::Help; my $d = Haineko::CLI::Help->new();
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.
https://github.com/azumakuniyuki/Haineko
azumakuniyuki <perl.org [at] azumakuniyuki.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.