Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mojo::Command usage using Pod::Usage
has usage => sub {
my $pod = '';
open my $printpod, '>', \$pod;
pod2usage(
-input => __FILE__,
-verbose => 1,
-exitval => 'NOEXIT',
-output => $printpod,
);
close $printpod;
return $pod;
};
@Skeeve

This comment has been minimized.

Copy link
Owner Author

@Skeeve Skeeve commented Oct 30, 2020

I want the help of mojolicious to return the usage as Pod::Usage with verbosity 1 does.

As the usage function should return a string, this is my proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment