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>

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