home *** CD-ROM | disk | FTP | other *** search
-
- <HTML>
- <HEAD>
- <TITLE>Pod::Find - find POD documents in directory trees</TITLE>
- <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
- <LINK REV="made" HREF="mailto:">
- </HEAD>
-
- <BODY>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Pod::Find - find POD documents in directory trees</P></STRONG>
- </TD></TR>
- </TABLE>
-
- <A NAME="__index__"></A>
- <!-- INDEX BEGIN -->
-
- <UL>
-
- <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
-
- <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
- <LI><A HREF="#description">DESCRIPTION</A></LI>
- <LI><A HREF="#options">OPTIONS</A></LI>
- <LI><A HREF="#author">AUTHOR</A></LI>
- <LI><A HREF="#see also">SEE ALSO</A></LI>
- </UL>
- <!-- INDEX END -->
-
- <HR>
- <P>
- <H1><A NAME="name">NAME</A></H1>
- <P>Pod::Find - find POD documents in directory trees</P>
- <P>
- <HR>
- <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
- <UL>
- <LI>Linux</LI>
- <LI>Solaris</LI>
- <LI>Windows</LI>
- </UL>
- <HR>
- <H1><A NAME="synopsis">SYNOPSIS</A></H1>
- <PRE>
- use Pod::Find qw(pod_find simplify_name);
- my %pods = pod_find({ -verbose => 1, -inc => 1 });
- foreach(keys %pods) {
- print "found library POD `$pods{$_}' in $_\n";
- }</PRE>
- <PRE>
- print "podname=",simplify_name('a/b/c/mymodule.pod'),"\n";</PRE>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P><STRONG>Pod::Find</STRONG> provides a function <STRONG>pod_find</STRONG> that searches for POD
- documents in a given set of files and directories. It returns a hash
- with the file names as keys and the POD name as value. The POD name
- is derived from the file name and its position in the directory tree.</P>
- <P>E.g. when searching in <EM>$HOME/perl5lib</EM>, the file
- <EM>$HOME/perl5lib/MyModule.pm</EM> would get the POD name <EM>MyModule</EM>,
- whereas <EM>$HOME/perl5lib/Myclass/Subclass.pm</EM> would be
- <EM>Myclass::Subclass</EM>. The name information can be used for POD
- translators.</P>
- <P>Only text files containing at least one valid POD command are found.</P>
- <P>A warning is printed if more than one POD file with the same POD name
- is found, e.g. <EM>CPAN.pm</EM> in different directories. This usually
- indicates duplicate occurrences of modules in the <EM>@INC</EM> search path.</P>
- <P>The function <STRONG>simplify_name</STRONG> is equivalent to <STRONG>basename</STRONG>, but also
- strips Perl-like extensions (.pm, .pl, .pod) and extensions like
- <EM>.bat</EM>, <EM>.cmd</EM> on Win32 and OS/2, respectively.</P>
- <P>Note that neither <STRONG>pod_find</STRONG> nor <STRONG>simplify_name</STRONG> are exported by
- default so be sure to specify them in the <STRONG>use</STRONG> statement if you need
- them:</P>
- <PRE>
- use Pod::Find qw(pod_find simplify_name);</PRE>
- <P>
- <HR>
- <H1><A NAME="options">OPTIONS</A></H1>
- <P>The first argument for <STRONG>pod_find</STRONG> may be a hash reference with options.
- The rest are either directories that are searched recursively or files.
- The POD names of files are the plain basenames with any Perl-like extension
- (.pm, .pl, .pod) stripped.</P>
- <DL>
- <DT><STRONG><A NAME="item_%2Dverbose"><STRONG>-verbose</STRONG></A></STRONG><BR>
- <DD>
- Print progress information while scanning.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dperl"><STRONG>-perl</STRONG></A></STRONG><BR>
- <DD>
- Apply Perl-specific heuristics to find the correct PODs. This includes
- stripping Perl-like extensions, omitting subdirectories that are numeric
- but do <EM>not</EM> match the current Perl interpreter's version id, suppressing
- <EM>site_perl</EM> as a module hierarchy name etc.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dscript"><STRONG>-script</STRONG></A></STRONG><BR>
- <DD>
- Search for PODs in the current Perl interpreter's installation
- <STRONG>scriptdir</STRONG>. This is taken from the local <A HREF="../../lib/Config.html">Config</A> module.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dinc"><STRONG>-inc</STRONG></A></STRONG><BR>
- <DD>
- Search for PODs in the current Perl interpreter's <EM>@INC</EM> paths. This
- automatically considers paths specified in the <A HREF="../../lib/Pod/perlrun.html#item_PERL5LIB"><CODE>PERL5LIB</CODE></A> environment.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="author">AUTHOR</A></H1>
- <P>Marek Rouchal <<A HREF="mailto:marek@saftsack.fs.uni-bayreuth.de">marek@saftsack.fs.uni-bayreuth.de</A>>,
- heavily borrowing code from Nick Ing-Simmons' PodToHtml.</P>
- <P>
- <HR>
- <H1><A NAME="see also">SEE ALSO</A></H1>
- <P><A HREF="../../lib/Pod/Parser.html">the Pod::Parser manpage</A>, <A HREF="../../lib/Pod/Checker.html">the Pod::Checker manpage</A></P>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Pod::Find - find POD documents in directory trees</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-