RogersMine

 view release on metacpan or  search on metacpan

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

Get the current package name.  Falls back to the module name.  Will be undef
if the parser hasn't reached the first \s-1MODULE\s0 line.
.ie n .IP "\s-1HASHREF\s0 = $parser\->pkgdata" 4
.el .IP "\s-1HASHREF\s0 = \f(CW$parser\fR\->pkgdata" 4
.IX Item "HASHREF = $parser->pkgdata"
The data hash corresponding to the current package, honoring the most recently
encountered \f(CW\*(C`=for object\*(C'\fR directive.  Ensures that it exists.
Returns a reference to the member of the main data structure, so modifications
are permanent and useful.
.ie n .IP "$parser\->parse_file (filename)" 4
.el .IP "\f(CW$parser\fR\->parse_file (filename)" 4
.IX Item "$parser->parse_file (filename)"
Parse one xs file.  Stores all the collected data in \fI\f(CI$parser\fI\fR's internal
data structures.
.ie n .IP "$parser\->swizzle_pods" 4
.el .IP "\f(CW$parser\fR\->swizzle_pods" 4
.IX Item "$parser->swizzle_pods"
Match \f(CW\*(C`=for apidoc\*(C'\fR pods to xsubs.
.ie n .IP "$parser\->preprocess_pods" 4
.el .IP "\f(CW$parser\fR\->preprocess_pods" 4
.IX Item "$parser->preprocess_pods"
Honor the \f(CW\*(C`_\|_hide_\|_\*(C'\fR and \f(CW\*(C`_\|_function_\|_\*(C'\fR directives in \f(CW\*(C`=for apidoc\*(C'\fR lines.
.Sp
We look for the strings anywhere, but you'll typically have it at the end of
the line, e.g.:
.Sp
.Vb 2
\&  =for apidoc symname _\|_hide_\|_        for detached blocks
\&  =for apidoc _\|_hide_\|_                for attached blocks
\&
\&  =for apidoc symname _\|_function_\|_    for functions rather than methods
\&  =for apidoc _\|_function_\|_            for functions rather than methods
.Ve
.ie n .IP "bool = $parser\->is_module_line ($line)" 4
.el .IP "bool = \f(CW$parser\fR\->is_module_line ($line)" 4
.IX Item "bool = $parser->is_module_line ($line)"
Analyze \fI\f(CI$line\fI\fR to see if it contains an \s-1XS MODULE\s0 directive.  If so, returns
true after setting the \fI\f(CI$parser\fI\fR's \fImodule\fR, \fIpackage\fR, and \fIprefix\fR
accordingly.
.ie n .IP "$pod = $parser\->slurp_pod_paragraph ($firstline, $term_regex=/^=cut\es*/)" 4
.el .IP "\f(CW$pod\fR = \f(CW$parser\fR\->slurp_pod_paragraph ($firstline, \f(CW$term_regex\fR=/^=cut\es*/)" 4
.IX Item "$pod = $parser->slurp_pod_paragraph ($firstline, $term_regex=/^=cuts*/)"
Slurp up \s-1POD\s0 lines from \fI\f(CI$filehandle\fI\fR from here to the next
\&\fI\f(CI$term_regex\fI\fR or \s-1EOF.\s0  Since you probably already read a
line to determine that we needed to start a pod, you can pass
that first line to be included.
.ie n .IP "$xsub = $parser\->parse_xsub (\e@lines)" 4
.el .IP "\f(CW$xsub\fR = \f(CW$parser\fR\->parse_xsub (\e@lines)" 4
.IX Item "$xsub = $parser->parse_xsub (@lines)"
.PD 0
.ie n .IP "$xsub = $parser\->parse_xsub (@lines)" 4
.el .IP "\f(CW$xsub\fR = \f(CW$parser\fR\->parse_xsub (@lines)" 4
.IX Item "$xsub = $parser->parse_xsub (@lines)"
.PD
Parse an xsub header, in the form of a list of lines,
into a data structure describing the xsub.  That includes
pulling out the argument types, aliases, and code type.
.Sp
Without artificial intelligence, we cannot reliably 
determine anything about the types or number of parameters
returned from xsubs with \s-1PPCODE\s0 bodies.
.Sp
\&\s-1OUTLIST\s0 parameters are pulled from the args list and put
into an \*(L"outlist\*(R" key.  \s-1IN_OUTLIST\s0 parameters are put into
both.
.Sp
Data type names are not mangled at all.
.Sp
Note that the method can take either a list of lines or a reference to a
list of lines.  The flat list form is provided for compatibility; the
reference form is preferred, to avoid duplicating a potentially large list
of strings.
.ie n .IP "$parser\->clean_out_empty_pods" 4
.el .IP "\f(CW$parser\fR\->clean_out_empty_pods" 4
.IX Item "$parser->clean_out_empty_pods"
Looks through the data member of the parser and removes any keys (and
associated values) when no pod, enums, and xsubs exist for the package.
.SH "AUTHOR"
.IX Header "AUTHOR"
muppet <scott at asofyet dot org>
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
Copyright (C) 2003, 2004 by muppet
.PP
This library is free software; you can redistribute it and/or modify it under
the terms of the \s-1GNU\s0 Library General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option) any
later version.
.PP
This library is distributed in the hope that it will be useful, but \s-1WITHOUT ANY
WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A
PARTICULAR PURPOSE.\s0  See the \s-1GNU\s0 Library General Public License for more
details.
.PP
You should have received a copy of the \s-1GNU\s0 Library General Public License along
with this library; if not, write to the Free Software Foundation, Inc., 
51 Franklin Street, Fifth Floor, Boston, \s-1MA 02110\-1301 USA.\s0



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