Class::Usul::TraitFor::Usage - Help and diagnostic information for command line programs
use Moo; extends 'Class::Usul'; with 'Class::Usul::TraitFor::Usage';
Help and diagnostic information for command line programs
Defines the following attributes;
encoding
Decode/encode input/output using this encoding
H help_manual
Print long help text extracted from this POD
h help_options
Print short help text extracted from this POD
? help_usage
Print option usage
V show_version
Prints the programs version number and exits
Requires the following;
config
dumper
next_argv
options_usage
output
quiet
Visits the configuration object, forcing evaluation of the lazy, and printing out the attributes and values
Dumps out the self referential object using Data::Printer
Searches the programs classes and roles to find the method implementation. Displays help text from the POD that describes the method
Lists the methods (marked by the method subroutine attribute) that can be called via the run method
$version_object = $self->app_version;
The version number of the configured application class
Called just after the object is constructed this method handles dispatching to the help methods
$bool = $self->can_call( $method );
Returns true if $self has a method given by $method that has defined the method method attribute
$self
$method
$self->exit_usage( $verbosity );
Print out usage information from POD. The $verbosity is; 0, 1 or 2
$verbosity
$self->exit_version;
Prints out the version of the C::U::Programs subclass and the exits
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Class-Usul. Patches are welcome
Larry Wall - For the Perl programming language
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2018 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install Class::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Usul
CPAN shell
perl -MCPAN -e shell install Class::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.