RogersMine

 view release on metacpan or  search on metacpan

local/man/man3/Glib::GenPod.3pm  view on Meta::CPAN

.Sp
This will create Gnome2/PanelApplet/main.pod containing the automatically
generated documentation for Gnome2::PanelApplet (hierarchy, signals, etc.) plus
the method listing from the current \s-1XS\s0 file.
.IP "=for enum Package::Name" 4
.IX Item "=for enum Package::Name"
.PD 0
.IP "=for flags Package::Name" 4
.IX Item "=for flags Package::Name"
.PD
This causes xsdoc2pod to call \f(CW\*(C`podify_values\*(C'\fR on \fIPackage::Name\fR when
writing the pod for the current package (as set by an object directive or
\&\s-1MODULE\s0 line).  Any text in this paragraph, to the next \f(CW\*(C`=cut\*(C'\fR, is included
in that section.
.IP "=for deprecated_by Package::Name" 4
.IX Item "=for deprecated_by Package::Name"
Used to add a deprecation warning, indicating \fIPackage::Name\fR as an
alternative way to achieve the same functionality.  There may be any number
these in each package.
.IP "=for see_also some_thing_to_see" 4
.IX Item "=for see_also some_thing_to_see"
Used to add extra see alsos onto the end of the parents, if any, for a given
object.  Anything following the space behind see_also up to the end of the
line will be placed onto the list of \*(L"see also\*(R"s.  There may be any number of
these in each package.
.IP "=for apidoc" 4
.IX Item "=for apidoc"
.PD 0
.IP "=for apidoc Full::Symbol::name" 4
.IX Item "=for apidoc Full::Symbol::name"
.PD
Paragraphs of this type document xsubs, and are associated with the xsubs
by xsdocparse.pl.  If the full symbol name is not included, the paragraph
must be attached to the xsub declaration (no blank lines between \f(CW\*(C`=cut\*(C'\fR and
the xsub).
.Sp
Within the apidoc PODs, we recognize a few special directives (the \*(L"for\es+\*(R"
is optional on these):
.RS 4
.IP "=for signature ..." 4
.IX Item "=for signature ..."
Override the generated call signature with the ... text.  If you include
multiple signature directives, they will all be used.  This is handy when
you want to change the return type or list different ways to invoke an
overloaded method, like this:
.Sp
.Vb 1
\& =for apidoc
\&
\& =signature bool Class\->foo
\&
\& =signature ($thing, @other) = $object\->foo ($it, $something)
\&
\& Text in here is included in the generated documentation.
\& You can actually include signature and arg directives
\& at any point in this pod \-\- they are stripped after.
\& In fact, any pod is valid in here, until the =cut.
\&
\& =cut
\& void foo (...)
\&     PPCODE:
\&        /* crazy code follows */
.Ve
.IP "=for arg name (type) description" 4
.IX Item "=for arg name (type) description"
.PD 0
.IP "=for arg name description" 4
.IX Item "=for arg name description"
.PD
The arg directive adds or overrides an argument description.  The
description text is optional, as is the type specification (the part
in parentheses).  If you want to hide an argument, specify \f(CW\*(C`_\|_hide_\|_\*(C'\fR
as its type.  The arg name does \fInot\fR need to include a sigil,
as dollar signs will be added.  \s-1FIXME\s0 what about @ for lists?
.RE
.RS 4
.Sp
Also, we honor a couple of \*(L"modifiers\*(R" on the =for apidoc line, following the
symbol name, if present:
.IP "\- _\|_hide_\|_" 4
.IX Item "- __hide__"
Do not document this xsub.  This is handy in certain situations, e.g., for
private functions.  \s-1DESTROY\s0 always has this turned on, for example.
.IP "\- _\|_gerror_\|_" 4
.IX Item "- __gerror__"
This function or method can generate a Glib::Error exception.
.IP "\- _\|_function_\|_" 4
.IX Item "- __function__"
Generate a function-style signature for this xsub.  The default is to
generate method-style signatures.
.IP "\- _\|_deprecated_\|_" 4
.IX Item "- __deprecated__"
This function or method is deprecated and should not be used in newly written
code.
.RE
.RS 4
.Sp
(These are actually handled by Glib::ParseXSDoc, but we list them here
because, well, they're an important part of how you document the \s-1XS\s0 files.)
.RE
.SH "FUNCTIONS"
.IX Header "FUNCTIONS"
.ie n .IP "xsdoc2pod ($datafile, $outdir='blib/lib', index=undef)" 4
.el .IP "xsdoc2pod ($datafile, \f(CW$outdir\fR='blib/lib', index=undef)" 4
.IX Item "xsdoc2pod ($datafile, $outdir='blib/lib', index=undef)"
Given a \fI\f(CI$datafile\fI\fR containing the output of xsdocparse.pl, create in 
\&\fI\f(CI$outdir\fI\fR a pod file for each package, containing everything we can think
of for that module.  Output is controlled by the \f(CW\*(C`=for object\*(C'\fR directives
and such in the source code.
.Sp
If you don't want each package to create a separate pod file, then use
this function's code as a starting point for your own pretty-printer.
.IP "add_types (@filenames)" 4
.IX Item "add_types (@filenames)"
Parse the given \fI\f(CI@filenames\fI\fR for entries to add to the \f(CW%basic_types\fR used
for C type name to Perl package name mappings of types that are not registered
with the Glib type system.  The file format is dead simple: blank lines are
ignored; /#.*$/ is stripped from each line as comments; the first token on
each line is considered to be a C type name, and the remaining tokens are the
description of that type.  For example, a valid file may look like this:
.Sp



( run in 0.498 second using v1.01-cache-2.11-cpan-5511b514fd6 )