ExtUtils::Manifest(3) Perl Programmers Reference Guide ExtUtils::Manifest(3) NAME ExtUtils::Manifest - utilities to write(1,2) and check a MANIFEST file(1,n) SYNOPSIS use ExtUtils::Manifest qw(...funcs to import...); mkmanifest(); my @missing_files = manicheck; my @skipped = skipcheck; my @extra_files = filecheck; my($missing, $extra) = fullcheck; my $found = manifind(); my $manifest = maniread(); manicopy($read(2,n,1 builtins),$target); maniadd({$file(1,n) => $comment, ...}); DESCRIPTION Functions ExtUtils::Manifest exports no functions by default. The following are exported on request mkmanifest mkmanifest(); Writes all files in(1,8) and below the current directory to your MANI- FEST. It works similar to find . > MANIFEST All files that match any regular expression in(1,8) a file(1,n) MANIFEST.SKIP (if(3,n) it exists) are ignored. Any existing MANIFEST file(1,n) will be saved as MANIFEST.bak. Lines from the old MANIFEST file(1,n) is preserved, including any comments that are found in(1,8) the existing MANIFEST file(1,n) in(1,8) the new one. manifind my $found = manifind(); returns a hash reference. The keys of the hash are the files found below the current directory. manicheck my @missing_files = manicheck(); checks if(3,n) all the files within a "MANIFEST" in(1,8) the current direc- tory really do exist. If "MANIFEST" and the tree below the current directory are in(1,8) sync(1,2,8) it silently returns an empty list. Otherwise it returns a list of files which are listed in(1,8) the "MANIFEST" but missing from the directory, and by default also outputs these names to STDERR. filecheck my @extra_files = filecheck(); finds files below the current directory that are not mentioned in(1,8) the "MANIFEST" file. An optional file(1,n) "MANIFEST.SKIP" will be con- sulted. Any file(1,n) matching a regular expression in(1,8) such a file(1,n) will not be reported as missing in(1,8) the "MANIFEST" file. The list of any extraneous files found is returned, and by default also reported to STDERR. fullcheck my($missing, $extra) = fullcheck(); does both a manicheck() and a filecheck(), returning then as two array refs. skipcheck my @skipped = skipcheck(); lists all the files that are skipped due to your "MANIFEST.SKIP" file. maniread my $manifest = maniread(); my $manifest = maniread($manifest_file); reads a named(5,8) "MANIFEST" file(1,n) (defaults to "MANIFEST" in(1,8) the cur- rent directory) and returns a HASH reference with files being the keys and comments being the values of the HASH. Blank lines and lines which start with "#" in(1,8) the "MANIFEST" file(1,n) are discarded. manicopy manicopy($src, $dest_dir); manicopy($src, $dest_dir, $how); copies the files that are the keys in(1,8) the HASH %$src to the $dest_dir. The HASH reference $read(2,n,1 builtins) is typically returned by the maniread() function. This function is useful for producing a direc- tory tree identical to the intended distribution tree. The third parameter $how can be used to specify a different methods of "copy- ing". Valid values are "cp", which actually copies the files, "ln" which creates hard links, and "best" which mostly links the files but copies any symbolic link(1,2) to make a tree without any symbolic link. Best is the default. maniadd maniadd({ $file(1,n) => $comment, ...}); Adds an entry to an existing MANIFEST unless its already there. $file(1,n) will be normalized (ie. Unixified). UNIMPLEMENTED MANIFEST Anything between white space and an end of line within a "MANIFEST" file(1,n) is considered to be a comment. Filenames and comments are sepa- rated by one or more TAB characters in(1,8) the output. MANIFEST.SKIP The file(1,n) MANIFEST.SKIP may contain regular expressions of files that should be ignored by mkmanifest() and filecheck(). The regular expres- sions should appear one on each line. Blank lines and lines which start with "#" are skipped. Use "\#" if(3,n) you need a regular expression to start with a sharp character. A typical example: # Version control files and dirs. \bRCS\b \bCVS\b ,v$ \B\.svn\b # Makemaker generated files and dirs. ^MANIFEST\. ^Makefile$ ^blib/ ^MakeMaker-\d # Temp, old and emacs backup files. ~$ \.old$ ^#.*#$ ^\.# If no MANIFEST.SKIP file(1,n) is found, a default set(7,n,1 builtins) of skips will be used, similar to the example above. If you want nothing skipped, simply make an empty MANIFEST.SKIP file. EXPORT_OK &mkmanifest, &manicheck, &filecheck, &fullcheck, &maniread, and &mani- copy are exportable. GLOBAL VARIABLES $ExtUtils::Manifest::MANIFEST defaults to "MANIFEST". Changing it results in(1,8) both a different "MANIFEST" and a different "MANIFEST.SKIP" file. This is useful if(3,n) you want to maintain different distributions for different audiences (say a user version(1,3,5) and a developer version(1,3,5) including RCS). $ExtUtils::Manifest::Quiet defaults to 0. If set(7,n,1 builtins) to a true value, all functions act silently. $ExtUtils::Manifest::Debug defaults to 0. If set(7,n,1 builtins) to a true value, or if(3,n) PERL_MM_MANIFEST_DEBUG is true, debugging output will be produced. DIAGNOSTICS All diagnostic output is sent to "STDERR". "Not in(1,8) MANIFEST:" file(1,n) is reported if(3,n) a file(1,n) is found which is not in(1,8) "MANIFEST". "Skipping" file(1,n) is reported if(3,n) a file(1,n) is skipped due to an entry in(1,8) "MANI- FEST.SKIP". "No such file:" file(1,n) is reported if(3,n) a file(1,n) mentioned in(1,8) a "MANIFEST" file(1,n) does not exist. "MANIFEST:" $! is reported if(3,n) "MANIFEST" could not be opened. "Added to MANIFEST:" file(1,n) is reported by mkmanifest() if(3,n) $Verbose is set(7,n,1 builtins) and a file(1,n) is added to MANIFEST. $Verbose is set(7,n,1 builtins) to 1 by default. ENVIRONMENT PERL_MM_MANIFEST_DEBUG Turns on debugging SEE ALSO ExtUtils::MakeMaker which has handy targets for most of the functional- ity. AUTHOR Andreas Koenig <andreas.koenig@anima.de> perl v5.8.5 2001-09-21 ExtUtils::Manifest(3)