.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MooX::Options::Manual::Man 3pm" .TH MooX::Options::Manual::Man 3pm "2022-06-30" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" MooX::Options::Manual::Man \- More documentation for the man option .SH "DESCRIPTION" .IX Header "DESCRIPTION" You can add more documentation for the man option. This is the long option. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& myTool \-\-man .Ve .SH "PARAMETERS" .IX Header "PARAMETERS" .SS "description" .IX Subsection "description" The description of your tool. .PP .Vb 1 \& use MooX::Options description => \*(AqDescription of your tools\*(Aq .Ve .SS "authors" .IX Subsection "authors" The list of authors of your tool. .PP .Vb 2 \& use MooX::Options authors => \*(AqCelogeek \*(Aq \& use MooX::Options authors => [\*(AqCelogeek \*(Aq \& A example of my tools \& \& myTool \-\-run \& \*(Aq .Ve .PP This should not be very easy to do it this way, but you can also extract it from your own script : .PP .Vb 10 \& 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 \*(AqSYNOPSIS\*(Aq) { \& $synopsis = $head1\->content; \& last; \& } \& } \& } \& use MooX::Options synopsis => $synopsis; .Ve .SH "OPTIONS" .IX Header "OPTIONS" .SS "long_doc" .IX Subsection "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. .PP .Vb 5 \& option \*(Aqfoo\*(Aq => ( \& is => \*(Aqro\*(Aq, \& doc => \*(Aqbar\*(Aq, \& long_doc => \*(Aqthis is a bar example that will appear in my man page\*(Aq, \& ); .Ve .PP The 'long_doc' will be write in place of the pod documentation. All the rules of pod, is applied. For instance, to add a new paragraph, you need to let a empty line. .PP .Vb 5 \& option \*(Aqfoo\*(Aq => ( \& is => \*(Aqro\*(Aq, \& doc => \*(Aqbar\*(Aq, \& long_doc => join("\en\en", "first paragraph", "second paragraph"), \& ); .Ve .PP See the perlpod for more explanation. .SH "SEE ALSO" .IX Header "SEE ALSO" MooX::Options .SH "AUTHOR" .IX Header "AUTHOR" celogeek .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2013 by celogeek . .PP This software is copyright (c) 2017 by Jens Rehsack. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.