NAME

YA::CLI::Usage - Class that handles usage and man page generation for action handlers

VERSION

version 0.004

SYNOPSIS

use YA::CLI::Usage;
my $usage = YA::CLI::Usage->new(
    verbose  => 1,
    rc       => 1,
    message  => 'Foo',
    pod_file => '/path/to/pod',
);

$usage->run();

DESCRIPTION

This module takes care of the pod2usage invocations done by the action handlers.

ATTRIBUTES

verbose

Defaults to 1. Maps to -verbose of "pod2usage" in Pod::Usage.

rc

The return value/code, defaults to 0. Maps to -exitval of "pod2usage" in Pod::Usage.

message

An optional message. Maps to -message of "pod2usage" in Pod::Usage.

pod_file

Specifies the path to the pod file that is used if supplied.

METHODS

run

Display the usage to your user.

AUTHOR

Wesley Schwengle <waterkip@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2022 by Wesley Schwengle.

This is free software, licensed under:

The (three-clause) BSD License