1MooX::Options::Manual::UMsaenr(3C)ontributed Perl DocumeMnotoaXt:i:oOnptions::Manual::Man(3)
2
3
4

NAME

6       MooX::Options::Manual::Man - More documentation for the man option
7

DESCRIPTION

9       You can add more documentation for the man option. This is the long
10       option.
11

SYNOPSIS

13         myTool --man
14

PARAMETERS

16   description
17       The description of your tool.
18
19         use MooX::Options description => 'Description of your tools'
20
21   authors
22       The list of authors of your tool.
23
24         use MooX::Options authors => 'Celogeek <me@celogeek.com>'
25         use MooX::Options authors => ['Celogeek <me@celogeek.com', 'Jens Rehsack']
26
27   synopsis
28       You can define a full example in pod format. This will be placed in the
29       synopsis section
30
31         use MooX::Options synopsis => '
32           A example of my tools
33
34             myTool --run
35         '
36
37       This should not be very easy to do it this way, but you can also
38       extract it from your own script :
39
40         use Moo;
41         use Pod::POM;
42         my $synopsis = "";
43         BEGIN {
44             my $parser = Pod::POM->new;
45             my $pom = $parser->parse(__FILE__) or die $parser->error();
46             for my $head1 ($pom->head1) {
47                 if ($head1->title eq 'SYNOPSIS') {
48                     $synopsis = $head1->content;
49                     last;
50                 }
51             }
52         }
53         use MooX::Options synopsis => $synopsis;
54

OPTIONS

56   long_doc
57       If a 'long_doc' parameter is present, it will replace the 'doc' or
58       'documentation' to generate a long doc for the man page.
59
60         option 'foo' => (
61           is => 'ro',
62           doc => 'bar',
63           long_doc => 'this is a bar example that will appear in my man page',
64         );
65
66       The 'long_doc' will be write in place of the pod documentation. All the
67       rules of pod, is applied.  For instance, to add a new paragraph, you
68       need to let a empty line.
69
70         option 'foo' => (
71           is => 'ro',
72           doc => 'bar',
73           long_doc => join("\n\n", "first paragraph", "second paragraph"),
74         );
75
76       See the perlpod for more explanation.
77

SEE ALSO

79       MooX::Options
80

AUTHOR

82       celogeek <me@celogeek.com>
83
85       This software is copyright (c) 2013 by celogeek <me@celogeek.com>.
86
87       This software is copyright (c) 2017 by Jens Rehsack.
88
89       This is free software; you can redistribute it and/or modify it under
90       the same terms as the Perl 5 programming language system itself.
91
92
93
94perl v5.36.0                      2023-01-20     MooX::Options::Manual::Man(3)
Impressum