.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\" ========================================================================
.de Sh \" Subsection heading
.de Sp \" Vertical space (when we can't use .PP)
.de Vb \" Begin verbatim text
.de Ve \" End verbatim text
.\" 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. | will give a
.\" real vertical bar. \*(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<>.
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
. 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
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
. tm Index:\\$1\t\\n%\t"\\$2"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. \" simple accents for nroff and troff
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
.\" ========================================================================
.TH Pod::Find 3 "2001-09-21" "perl v5.8.8" "Perl Programmers Reference Guide"
Pod::Find \- find POD documents in directory trees
\& use Pod::Find qw(pod_find simplify_name);
\& my %pods = pod_find({ -verbose => 1, -inc => 1 });
\& print "found library POD `$pods{$_}' in $_\en";
\& print "podname=",simplify_name('a/b/c/mymodule.pod'),"\en";
\& $location = pod_where( { -inc => 1 }, "Pod::Find" );
\&\fBPod::Find\fR provides a set of functions to locate \s-1POD\s0 files. Note that
no function is exported by default to avoid pollution of your namespace,
so be sure to specify them in the \fBuse\fR statement if you need them:
\& use Pod::Find qw(pod_find);
From this version on the typical \s-1SCM\s0 (software configuration management)
files/directories like \s-1RCS\s0, \s-1CVS\s0, \s-1SCCS\s0, .svn are ignored.
.ie n .Sh """pod_find( { %opts } , @directories )"""
.el .Sh "\f(CWpod_find( { %opts } , @directories )\fP"
.IX Subsection "pod_find( { %opts } , @directories )"
The function \fBpod_find\fR searches for \s-1POD\s0 documents in a given set of
files and/or directories. It returns a hash with the file names as keys
and the \s-1POD\s0 name as value. The \s-1POD\s0 name is derived from the file name
and its position in the directory tree.
E.g. when searching in \fI$HOME/perl5lib\fR, the file
\&\fI$HOME/perl5lib/MyModule.pm\fR would get the \s-1POD\s0 name \fIMyModule\fR,
whereas \fI$HOME/perl5lib/Myclass/Subclass.pm\fR would be
\&\fIMyclass::Subclass\fR. The name information can be used for \s-1POD\s0
Only text files containing at least one valid \s-1POD\s0 command are found.
A warning is printed if more than one \s-1POD\s0 file with the same \s-1POD\s0 name
is found, e.g. \fI\s-1CPAN\s0.pm\fR in different directories. This usually
indicates duplicate occurrences of modules in the \fI@INC\fR search path.
\&\fB\s-1OPTIONS\s0\fR The first argument for \fBpod_find\fR may be a hash reference
with options. The rest are either directories that are searched
recursively or files. The \s-1POD\s0 names of files are the plain basenames
with any Perl-like extension (.pm, .pl, .pod) stripped.
.ie n .IP """\-verbose => 1""" 4
.el .IP "\f(CW\-verbose => 1\fR" 4
Print progress information while scanning.
.ie n .IP """\-perl => 1""" 4
.el .IP "\f(CW\-perl => 1\fR" 4
Apply Perl-specific heuristics to find the correct PODs. This includes
stripping Perl-like extensions, omitting subdirectories that are numeric
but do \fInot\fR match the current Perl interpreter's version id, suppressing
\&\fIsite_perl\fR as a module hierarchy name etc.
.ie n .IP """\-script => 1""" 4
.el .IP "\f(CW\-script => 1\fR" 4
Search for PODs in the current Perl interpreter's installation
\&\fBscriptdir\fR. This is taken from the local Config module.
.ie n .IP """\-inc => 1""" 4
.el .IP "\f(CW\-inc => 1\fR" 4
Search for PODs in the current Perl interpreter's \fI@INC\fR paths. This
automatically considers paths specified in the \f(CW\*(C`PERL5LIB\*(C'\fR environment
as this is prepended to \fI@INC\fR by the Perl interpreter itself.
.ie n .Sh """simplify_name( $str )"""
.el .Sh "\f(CWsimplify_name( $str )\fP"
.IX Subsection "simplify_name( $str )"
The function \fBsimplify_name\fR is equivalent to \fBbasename\fR, but also
strips Perl-like extensions (.pm, .pl, .pod) and extensions like
\&\fI.bat\fR, \fI.cmd\fR on Win32 and \s-1OS/2\s0, or \fI.com\fR on \s-1VMS\s0, respectively.
.ie n .Sh """pod_where( { %opts }, $pod )"""
.el .Sh "\f(CWpod_where( { %opts }, $pod )\fP"
.IX Subsection "pod_where( { %opts }, $pod )"
Returns the location of a pod document given a search directory
and a module (e.g. \f(CW\*(C`File::Find\*(C'\fR) or script (e.g. \f(CW\*(C`perldoc\*(C'\fR) name.
.ie n .IP """\-inc => 1""" 4
.el .IP "\f(CW\-inc => 1\fR" 4
Search \f(CW@INC\fR for the pod and also the \f(CW\*(C`scriptdir\*(C'\fR defined in the
.ie n .IP """\-dirs => [ $dir1, $dir2, ... ]""" 4
.el .IP "\f(CW\-dirs => [ $dir1, $dir2, ... ]\fR" 4
.IX Item "-dirs => [ $dir1, $dir2, ... ]"
Reference to an array of search directories. These are searched in order
before looking in \f(CW@INC\fR (if \fB\-inc\fR). Current directory is used if
.ie n .IP """\-verbose => 1""" 4
.el .IP "\f(CW\-verbose => 1\fR" 4
List directories as they are searched
Returns the full path of the first occurrence to the file.
Package names (eg 'A::B') are automatically converted to directory
names in the selected directory. (eg on unix 'A::B' is converted to
\&'A/B'). Additionally, '.pm', '.pl' and '.pod' are appended to the
search automatically if required.
A subdirectory \fIpod/\fR is also checked if it exists in any of the given
search directories. This ensures that e.g. perlfunc is
It is assumed that if a module name is supplied, that that name
matches the file name. Pods are not opened to check for the '\s-1NAME\s0'
A check is made to make sure that the file that is found does
contain some pod documentation.
.ie n .Sh """contains_pod( $file , $verbose )"""
.el .Sh "\f(CWcontains_pod( $file , $verbose )\fP"
.IX Subsection "contains_pod( $file , $verbose )"
Returns true if the supplied filename (not \s-1POD\s0 module) contains some pod
Please report bugs using <http://rt.cpan.org>.
Marek Rouchal <marekr@cpan.org>,
heavily borrowing code from Nick Ing\-Simmons' PodToHtml.
Tim Jenness <t.jenness@jach.hawaii.edu> provided
\&\f(CW\*(C`pod_where\*(C'\fR and \f(CW\*(C`contains_pod\*(C'\fR.
Pod::Parser, Pod::Checker, perldoc