Gimp::Pod - Evaluate pod documentation embedded in scripts.
use Gimp::Pod; my $pod = Gimp::Pod->new; my $text = $pod->format; my $synopsis = $pod->section('SYNOPSIS'); my @sections = $pod->sections; my @args = fixup_args(@register_args);
Gimp::Pod can be used to find and parse embedded pod documentation in Gimp-Perl scripts, returning formatted text.
Gimp::Pod
fixup_args is exported by default. It takes a list of arguments, and for all the scalar arguments, will (if they are false) extract them from various parts of the calling script's POD documentation, and then return the fixed-up list:
fixup_args
Defaults to the NAME section of the POD, the part before the first -. Falls back to the script's filename.
-
Defaults to the NAME section of the POD, the part after the first -.
Defaults to the DESCRIPTION section of the POD.
Defaults to the AUTHOR section of the POD.
Defaults to the LICENSE section of the POD.
Defaults to the DATE section of the POD.
Defaults to the SYNOPSIS section of the POD.
Defaults to the "IMAGE TYPES" section of the POD.
Defaults to the "PARAMETERS" section of the POD, passed to eval, e.g.:
eval
=head PARAMETERS [ PF_COLOR, 'color', 'Colour', 'black' ], [ PF_FONT, 'font', 'Font', 'Arial' ],
You don't have to indent it so that POD treats it as verbatim, but it will be more readable in any POD viewer if you do.
Defaults to the "RETURN VALUES" section of the POD, passed to eval. Not providing the relevant POD section is perfectly valid, so long as you intend to return no values.
Untouched. Must be supplied - will normally be the code reference.
make_arg_line is exported by default. It is used by source filters in Gimp::Fu and Gimp::Extension to generate the line inserted at the start of functions passed to podregister. It takes as arguments, the output of fixup_args, and returns the text to be inserted (possibly an empty string).
make_arg_line
podregister
Return a new Gimp::Pod object representing the current script or undef, if an error occured.
Return the embedded pod documentation in text format, or undef if no documentation can be found.
Return the section with the header $header, or undef if not found. There is no trailing newline on the returned string.
$header
Returns a list of paragraph titles found in the pod.
Marc Lehmann <pcg@goof.com>. Rewritten to eliminate external executables by Ed J.
perl(1), Gimp
To install Gimp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gimp
CPAN shell
perl -MCPAN -e shell install Gimp
For more information on module installation, please visit the detailed CPAN module installation guide.