perlfunc
root
<P>
ExtUtils::Manifest - utilities to write and check a
<FONT SIZE=-1>MANIFEST</FONT> file
<P>
<HR>
<P>
<CODE>require ExtUtils::Manifest;</CODE>
<P>
<CODE>ExtUtils::Manifest::mkmanifest;</CODE>
<P>
<CODE>ExtUtils::Manifest::manicheck;</CODE>
<P>
<CODE>ExtUtils::Manifest::filecheck;</CODE>
<P>
<CODE>ExtUtils::Manifest::fullcheck;</CODE>
<P>
<CODE>E
<P>
<CODE>Mkmanifest()</CODE> writes all
files in and below the current directory to a file named in the global
variable $ExtUtils::Manifest::MANIFEST (which defaults to <CODE>MANIFEST</CODE>) in the current directory. It works similar to
<P>
<PRE> find . -print
</PRE>
<P>
but in doing so checks each line in an existing <CODE>MANIFEST</CODE> file and includes any comments that are found in the existing <CODE>MANIFEST</CODE> file in the new one. Anything between white space and an end of line within
a <CODE>MANIFEST</CODE> file is considered to be a comment. Filenames and comments are seperated by one or more
<FONT SIZE=-1>TAB</FONT> characters in the output. All files that match any regular expression in a file
<CODE>MANIFEST.SKIP</CODE> (if such a file exists) are ignored.
<P>
<CODE>Manicheck()</CODE> checks if all
the files within a <CODE>MANIFEST</CODE> in the current directory really do exist. It only reports discrepancies and exits silently if
<FONT SIZE=-1>MANIFEST</FONT> and the tree below the current directory are in sync.
<P>
<CODE>Filecheck()</CODE> finds files
below the current directory that are not mentioned in the <CODE>MANIFEST</CODE> file. An optional file <CODE>MANIFEST.SKIP</CODE>
will be consulted. Any file matching a regular expression in such a file
will not be reported as missing in the <CODE>MANIFEST</CODE> file.
<P>
<CODE>Fullcheck()</CODE> does both a
<CODE>manicheck()</CODE> and a
<CODE>filecheck().</CODE>
<P>
<CODE>Skipcheck()</CODE> lists all the
files that are skipped due to your
<CODE>MANIFEST.SKIP</CODE> file.
<P>
<CODE>Manifind()</CODE> retruns a hash
reference. The keys of the hash are the files found below the current
directory.
<P>
<CODE>Maniread($file)</CODE> reads
a named <CODE>MANIFEST</CODE> file (defaults to
<CODE>MANIFEST</CODE> in the current directory) and returns a
<FONT SIZE=-1>HASH</FONT> reference with files being the keys and comments being the values of the
<FONT SIZE=-1>HASH.</FONT> Blank lines and lines which start with
<CODE>#</CODE> in the <CODE>MANIFEST</CODE> file are discarded.
<P>
<EM>Manicopy($read,$target,$how)</EM> copies the files that are the keys in the
<FONT SIZE=-1>HASH</FONT> <EM>%$read</EM> to the named target directory. The
<FONT SIZE=-1>HASH</FONT> reference
<EM>$read</EM> is typically returned by the
<CODE>maniread()</CODE> function. This
function is useful for producing a directory tree identical to the intended
distribution tree. The third parameter <CODE>$how</CODE> can be used to
specify a different methods of ``copying''. Valid values are <CODE>cp</CODE>, which actually copies the files, <CODE>ln</CODE> which creates hard links, and
<CODE>best</CODE> which mostly links the files but copies any symbolic link to make a tree
without any symbolic link. Best is the default.
<P>
<HR>
<H1><A NAME="MANIFEST_SKIP">MANIFEST.SKIP</A></H1>
<P>
The file
<FONT SIZE=-1>MANIFEST.SKIP</FONT> may contain regular expressions of files that should be ignored by
<CODE>mkmanifest()</CODE> and
<CODE>filecheck().</CODE> The regular expressions should appear one on each line. Blank lines and lines which start with
<CODE>#</CODE> are skipped. Use <CODE>\#</CODE> if you need a regular expression to start with a sharp character.
<FONT SIZE=-1>A</FONT> typical example:
<P>
<PRE> \bRCS\b
^MANIFEST\.
^Makefile$
~$
\.html$
\.old$
^blib/
^MakeMaker-\d
</PRE>
<P>
<HR>
<H1><A NAME="EXPORT_OK">EXPORT_OK</A></H1>
<P>
<CODE>&mkmanifest</CODE>, <CODE>&manicheck</CODE>, <CODE>&filecheck</CODE>, <CODE>&fullcheck</CODE>,
<CODE>&maniread</CODE>, and <CODE>&manicopy</CODE> are exportable.
<P>
<HR>
<H1><A NAME="GLOBAL_VARIABLES">GLOBAL VARIABLES</A></H1>
<P>
<CODE>$ExtUtils::Manifest::MANIFEST</CODE> defaults to <CODE>MANIFEST</CODE>. Changing it results in both a different <CODE>MANIFEST</CODE> and a different
<CODE>MANIFEST.SKIP</CODE> file. This is useful if you want to maintain different distributions for different audiences (say a user version and a developer version including
<FONT SIZE=-1>RCS).</FONT>
<P>
<CODE>$ExtUtils::Manifest::Quiet</CODE> defaults to 0. If set to a true value, all functions act silently.
<P>
<HR>
<H1><A NAME="DIAGNOSTICS">DIAGNOSTICS</A></H1>
<P>
All diagnostic output is sent to <CODE>STDERR</CODE>.
<DL>
<DT><STRONG><A NAME="item_Not">Not in MANIFEST: file</A></STRONG><P>
<DD>
is reported if a file is found, that is missing in the <CODE>MANIFEST</CODE>
file which is excluded by a regular expression in the file
<CODE>MANIFEST.SKIP</CODE>.
<P><DT><STRONG><A NAME="item_No">No such file: file</A></STRONG><P>
<DD>
is reported if a file mentioned in a <CODE>MANIFEST</CODE> file does not exist.
<P><DT><STRONG><A NAME="item_MANIFEST">MANIFEST: $!</A></STRONG><P>
<DD>
is reported if <CODE>MANIFEST</CODE> could not be opened.
<P><DT><STRONG><A NAME="item_Added">Added to MANIFEST: file</A></STRONG><P>
<DD>
is reported by
<CODE>mkmanifest()</CODE> if <CODE>$Verbose</CODE> is set and a file is added to
<FONT SIZE=-1>MANIFEST.</FONT> <CODE>$Verbose</CODE> is set to 1 by default.
</DL>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
[perlman:ExtUtils::MakeMaker|MakeMaker] which has handy targets for most of the functionality.
<P>
<HR>
<H1><A NAME="AUTHOR">AUTHOR</A></H1>
<P>
Andreas Koenig <<EM>koenig@franz.ww.TU-Berlin.DE</EM>>
<HR>