MooX::O...al::Man(3)
okay so bestie, you just opened MooX::Options::Manual::Man(3) β the page that gives you extra documentation for the man option. Itβs literally the long option, and itβs serving main-character docs energy. π«Ά
π NAME π
MooX::Options::Manual::Man β more documentation for the man option, periodt.
π DESCRIPTION π
okay so you can add more documentation for the man option. This is the long option. Thatβs the vibe. π
β¨ SYNOPSIS β¨
myTool --man
πΈ PARAMETERS πΈ
π· description π·
The description of your tool. Drop it in like this:
use MooX::Options description => 'Description of your tools'
π· authors π·
The list of authors of your tool. Hereβs one author, and hereβs a whole list:
use MooX::Options authors => 'Celogeek <me@celogeek.com>'
use MooX::Options authors => ['Celogeek <me@celogeek.com', 'Jens Rehsack']
π· synopsis π·
You can define a full example in pod format, and it will be placed in the synopsis section:
use MooX::Options synopsis => '
A example of my tools
myTool --run
'
ngl, doing it this way isnβt very easy, but you can also extract it from your own script:
use Moo;
use Pod::POM;
my $synopsis = "";
BEGIN {
my $parser = Pod::POM->new;
my $pom = $parser->parse(__FILE__) or die $parser->error();
for my $head1 ($pom->head1) {
if ($head1->title eq 'SYNOPSIS') {
$synopsis = $head1->content;
last;
}
}
}
use MooX::Options synopsis => $synopsis;
π OPTIONS π
π¦ long_doc π¦
If a long_doc parameter is present, it will replace the doc or documentation to generate a long doc for the man page:
option 'foo' => (
is => 'ro',
doc => 'bar',
long_doc => 'this is a bar example that will appear in my man page',
);
The long_doc gets written in place of the pod documentation, and all the pod rules apply. For instance, to add a new paragraph, you need to leave an empty line:
option 'foo' => (
is => 'ro',
doc => 'bar',
long_doc => join("\n\n", "first paragraph", "second paragraph"),
);
See perlpod for more explanation. π«Ά
π¦ SEE ALSO π¦
MooX::Options
π AUTHOR π
celogeek <me@celogeek.com>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2013 by celogeek <me@celogeek.com>.
This software is copyright (c) 2017 by Jens Rehsack.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay thatβs the whole page, bestie. it came with perl v5.42.0 and the date 2019-04-03. slay and goodbye πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-MooX-Options 4.103-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms