GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gimp::Pod(3) User Contributed Perl Documentation Gimp::Pod(3)

Gimp::Pod - Evaluate pod documentation embedded in scripts.

  use Gimp::Pod;
  my $pod = Gimp::Pod->new;
  my $synopsis = $pod->section('SYNOPSIS');
  my @temp_procs = $pod->sections('TEMPORARY PROCEDURES');
  my $text = $pod->section('TEMPORARY PROCEDURES', 'p1 - x', 'PARAMETERS');

  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.

fixup_args
"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:
$function
Defaults to the NAME section of the POD, the part before the first "-". Falls back to the script's filename.
$blurb
Defaults to the NAME section of the POD, the part after the first "-".
$help
Defaults to the DESCRIPTION section of the POD.
$author
Defaults to the AUTHOR section of the POD.
$copyright
Defaults to the LICENSE section of the POD.
$date
Defaults to the DATE section of the POD.
$menupath
Defaults to the SYNOPSIS section of the POD.
$imagetypes
Defaults to the "IMAGE TYPES" section of the POD.
$params
Defaults to the "PARAMETERS" section of the POD, passed to "eval", e.g.:

  =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. If you pass in a true non-ref value, it will be evaluated as though it had been read from the POD.

$results
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. As above, if passed a true non-ref value, it will be evaluated.
$other
Untouched. Must be supplied - will normally be the code reference.
make_arg_line
"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).

new
Return a new Gimp::Pod object representing the current script or undef, if an error occured.
section(@headers)
Return the section with the header described by @headers, the first being a "head1", the second <head2>, etc, or undef if not found. There is no trailing newline on the returned string.
sections(@headers)
Returns a list of section titles found in the pod, described similarly to above.

Marc Lehmann <pcg@goof.com>. Rewritten to eliminate external executables by Ed J.

perl(1), Gimp
2019-04-11 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.