ExtUtils::Manifest(3)
NAME π
okay bestie, welcome to ExtUtils::Manifest β literally the utilities to write and check a MANIFEST file π. no cap, this is the little toolkit that keeps your distribution file list from being a whole mess.
VERSION π¦
version 1.75 β periodt.
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,$target);
maniadd({$file => $comment, ...});
DESCRIPTION π
the original DESCRIPTION is literally just ... β minimal queen behavior, no extra lore π.
FUNCTIONS πΈ
ExtUtils::Manifest exports no functions by default. the following are exported on request:
mkmanifest π
mkmanifest();
writes all files in and below the current directory to your MANIFEST. it works similar to the result of the Unix command:
find . > MANIFEST
all files that match any regular expression in a file MANIFEST.SKIP (if it exists) are ignored. any existing MANIFEST file will be saved as MANIFEST.bak. slay, but make a backup first, bestie π
.
manifind π₯
my $found = manifind();
returns a hash reference. the keys of the hash are the files found below the current directory. iykyk.
manicheck π«Ά
my @missing_files = manicheck();
checks if all the files within a MANIFEST in the current directory really do exist. if MANIFEST and the tree below the current directory are in sync it silently returns an empty list. otherwise it returns a list of files which are listed in the MANIFEST but missing from the directory, and by default also outputs these names to STDERR. not me getting emotional over an empty list π.
filecheck π¦
my @extra_files = filecheck();
finds files below the current directory that are not mentioned in the MANIFEST file. an optional file MANIFEST.SKIP will be consulted. any file matching a regular expression in such a file will not be reported as missing in the MANIFEST file. the list of any extraneous files found is returned, and by default also reported to STDERR. lowkey the vibe check for your file tree β¨.
fullcheck π
my($missing, $extra) = fullcheck();
does both a manicheck() and a filecheck(), returning then as two array refs (yep, the source literally says returning then β typo queen moment, but you know what she means π
).
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 MANIFEST file (defaults to MANIFEST in the current 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 the MANIFEST file are discarded. iconic data structure behavior.
maniskip π§
my $skipchk = maniskip();
my $skipchk = maniskip($manifest_skip_file);
if ($skipchk->($file)) { .. }
reads a named MANIFEST.SKIP file (defaults to MANIFEST.SKIP in the current directory) and returns a CODE reference that tests whether a given filename should be skipped. fr fr, it's giving gatekeeper but make it useful.
manicopy π
manicopy(\%src, $dest_dir);
manicopy(\%src, $dest_dir, $how);
copies the files that are the keys in %src to the $dest_dir. %src is typically returned by the maniread() function.
manicopy( maniread(), $dest_dir );
this function is useful for producing a directory tree identical to the intended distribution tree.
$how can be used to specify a different methods of "copying". 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 to make a tree without any symbolic link. "cp" is the default. choose your copy girlie wisely π
.
maniadd π
maniadd({ $file => $comment, ...});
adds an entry to an existing MANIFEST unless its already there.
$file will be normalized (ie. Unixified). UNIMPLEMENTED. yes bestie, it said what it said π.
MANIFEST π
a list of files in the distribution, one file per line. the MANIFEST always uses Unix filepath conventions even if you're not on Unix. this means foo/bar style not foo\bar.
anything between white space and an end of line within a MANIFEST file is considered to be a comment. any line beginning with # is also a comment. beginning with ExtUtils::Manifest 1.52, a filename may contain whitespace characters if it is enclosed in single quotes; single quotes or backslashes in that filename must be backslash-escaped.
# this a comment
some/file
some/other/file comment about some/file
'some/third file' comment
MANIFEST.SKIP π
the file MANIFEST.SKIP may contain regular expressions of files that should be ignored by mkmanifest() and filecheck(). the regular expressions should appear one on each line. blank lines and lines which start with # are skipped. use \# if you need a regular expression to start with a #.
for 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 is found, a default set of skips will be used, similar to the example above. if you want nothing skipped, simply make an empty MANIFEST.SKIP file.
in one's own MANIFEST.SKIP file, certain directives can be used to include the contents of other MANIFEST.SKIP files. at present two such directives are recognized.
#!include_defaultβ this tellsExtUtils::Manifestto read the defaultMANIFEST.SKIPfile and skip files accordingly, but not to include it in the localMANIFEST.SKIP. this is intended to skip files according to a system default, which can change over time without requiring further changes to the distribution'sMANIFEST.SKIP.#!include /Path/to/another/manifest.skipβ this inserts the contents of the specified external file in the localMANIFEST.SKIP. this is intended for authors to have a centralMANIFEST.SKIPfile, and to include it with their various distributions.
the included contents will be inserted into the MANIFEST.SKIP file in between #!start included /path/to/manifest.skip and #!end included /path/to/manifest.skip markers. the original MANIFEST.SKIP is saved as MANIFEST.SKIP.bak. bestie, it's giving organized and slightly dramatic, which is the brand π«Ά.
EXPORT_OK β¨
&mkmanifest, &manicheck, &filecheck, &fullcheck, &maniread, and &manicopy are exportable.
GLOBAL VARIABLES π
$ExtUtils::Manifest::MANIFESTdefaults to"MANIFEST". changing it results in both a differentMANIFESTand a differentMANIFEST.SKIPfile. this is useful if you want to maintain different distributions for different audiences (say a user version and a developer version including RCS).$ExtUtils::Manifest::Quietdefaults to0. if set to a true value, all functions act silently.$ExtUtils::Manifest::Debugdefaults to0. if set to a true value, or ifPERL_MM_MANIFEST_DEBUGis true, debugging output will be produced.
DIAGNOSTICS π
all diagnostic output is sent to "STDERR".
"Not in MANIFEST:"file β is reported if a file is found which is not inMANIFEST."Skipping"file β is reported if a file is skipped due to an entry inMANIFEST.SKIP."No such file:"file β is reported if a file mentioned in aMANIFESTfile does not exist."MANIFEST:"$!β is reported ifMANIFESTcould not be opened."Added to MANIFEST:"file β is reported bymkmanifest()if$Verboseis set and a file is added toMANIFEST.$Verboseis set to1by default.
ENVIRONMENT π±
PERL_MM_MANIFEST_DEBUGβ turns on debugging.
SEE ALSO π
ExtUtils::MakeMaker which has handy targets for most of the functionality.
AUTHOR π
Andreas Koenig "andreas.koenig@anima.de"
currently maintained by the Perl Toolchain Gang.
COPYRIGHT AND LICENSE π
this software is copyright (c) 1996- by Andreas Koenig.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
π that's the whole vibe β this page is from perl v5.42.0, dated 2023-04-30, and yeah it's the ExtUtils::Manifest(3) manual. bye bestie, go manifest slay π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-ExtUtils-Manifest 1.75-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms