App::CLI::Command::Help
package MyApp::Help; use base qw(App::CLI::Command::Help); sub run { my $self = shift; # preprocess $self->SUPER::run(@_); # App::CLI::Command::Help would output POD of each command }
Your command class should be capitalized.
To add a help message, just add POD in the command class:
package YourApp::Command::Foo; =head1 NAME YourApp::Command::Foo - execute foo =head1 DESCRIPTION blah blah =head1 USAGE .... =cut
To install App::CLI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::CLI
CPAN shell
perl -MCPAN -e shell install App::CLI
For more information on module installation, please visit the detailed CPAN module installation guide.