ExtUti...nifest(3perl)

🌸 NAME 🌸

ExtUtils::Manifest β€” utilities to write and check a MANIFEST file πŸ’–

(yes bestie, this is the ExtUti...nifest(3perl) page β€” section 3perl of the perl manpages, the title just got cut off on the way in, it's giving mysterious iykyk energy πŸ’…)


✨ VERSION ✨

version 1.75 πŸŽ€


πŸ¦‹ 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 πŸ’«

...

fr fr, that's the whole description, it's literally three dots and honestly? iconic. 😭


πŸ‘‘ FUNCTIONS πŸ‘‘

ExtUtils::Manifest exports no functions by default. The following ones are exported on request β€” you gotta ask nicely πŸ₯Ί:

πŸ“ mkmanifest

mkmanifest();

Writes all the files in and below the current directory into your MANIFEST. It works basically like the result of running this Unix command:

find . > MANIFEST

Every file that matches any regular expression sitting in a file called MANIFEST.SKIP (if that file even exists) gets ignored, no cap 🚫.

Heads up bestie: any MANIFEST file you already have gets saved as MANIFEST.bak first. πŸ’Ύ

🧚 manifind

my $found = manifind();

returns a hash reference. The keys of that hash are the files found below the current directory. Slay. πŸ”

πŸ’œ manicheck

my @missing_files = manicheck();

checks if all the files inside a MANIFEST in the current directory actually exist. If MANIFEST and the tree below the current directory are in sync, it silently returns an empty list β€” not a peep, silent like a library 🀫. Otherwise it returns a list of the files that are listed in the MANIFEST but are missing from the directory, and by default it also prints those names to STDERR.

🌈 filecheck

my @extra_files = filecheck();

finds files below the current directory that are not mentioned in the MANIFEST file. If there's an optional MANIFEST.SKIP file, it will be consulted. Any file matching a regular expression in that file will not be reported as missing from the MANIFEST file. The list of any extraneous files found gets returned, and by default it's also reported to STDERR.

πŸŽ€ fullcheck

my($missing, $extra) = fullcheck();

does a manicheck() and a filecheck(), and returns them as two array refs. Two-for-one deal, we love a bundle πŸ’…

🫢 skipcheck

my @skipped = skipcheck();

lists all the files that get skipped because of your MANIFEST.SKIP file. Periodt.

⭐ maniread

my $manifest = maniread();
my $manifest = maniread($manifest_file);

reads a MANIFEST file with the name you give it (it defaults to MANIFEST in the current directory) and hands you back a HASH reference where the files are the keys and the comments are the values. Blank lines, plus any line that starts with "#" inside the MANIFEST file, get discarded πŸ—‘οΈ.

πŸ’€ maniskip

my $skipchk = maniskip();
my $skipchk = maniskip($manifest_skip_file);

if ($skipchk->($file)) { .. }

reads a MANIFEST.SKIP file with the name you give it (defaults to MANIFEST.SKIP in the current directory) and returns a CODE reference that tests whether a given filename should be skipped. Little gatekeeper behaviour, we stan πŸšͺ

🌸 manicopy

manicopy(\%src, $dest_dir);
manicopy(\%src, $dest_dir, $how);

Copies the files that are the keys in %src over to $dest_dir. %src is typically whatever the maniread() function gave you back.

manicopy( maniread(), $dest_dir );

This function is genuinely useful for producing a directory tree identical to the intended distribution tree. ✨

$how lets you pick a different method of "copying". The valid values are:

  • "cp" β€” which actually copies the files
  • "ln" β€” which creates hard links
  • "best" β€” which mostly links the files but copies any symbolic link, so you get a tree with no symbolic links in it at all

"cp" is the default, bestie πŸ’…

πŸ¦‹ maniadd

maniadd({ $file => $comment, ...});

Adds an entry to an existing MANIFEST unless it's already there.

$file will be normalized (ie. Unixified).

UNIMPLEMENTED ⚠️ like... it's just not there yet bestie, don't come for me

🌟 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. Slashes stay winning 🌈

Anything between white space and an end of line inside a MANIFEST file counts as a comment. Any line beginning with # is also a comment. And starting with ExtUtils::Manifest 1.52, a filename may contain whitespace characters if it's enclosed in single quotes; single quotes or backslashes inside 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 that start with "#" are skipped. Use "\#" if you need a regular expression to actually 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 gets used, similar to the example above. If you want nothing skipped, simply make an empty MANIFEST.SKIP file. Simple as that, no notes πŸ’…

Inside your 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 tells ExtUtils::Manifest to read the default MANIFEST.SKIP file and skip files accordingly, but not to include it in the local MANIFEST.SKIP. This is intended to skip files according to a system default, which can change over time without requiring any further changes to the distribution's MANIFEST.SKIP. Set it and forget it energy ✨

πŸ’œ #!include /Path/to/another/manifest.skip

This inserts the contents of the specified external file into the local MANIFEST.SKIP. This is intended for authors to have a central MANIFEST.SKIP file, and to include it with their various distributions. One file to rule them all πŸ‘‘

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.

⭐ EXPORT_OK

&mkmanifest, &manicheck, &filecheck, &fullcheck, &maniread, and &manicopy are exportable.

🌈 GLOBAL VARIABLES

  • $ExtUtils::Manifest::MANIFEST defaults to "MANIFEST". Changing it results in both a different MANIFEST and a different MANIFEST.SKIP file. 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::Quiet defaults to 0. If you set it to a true value, all functions act silently 🀫.
  • $ExtUtils::Manifest::Debug defaults to 0. If you set it to a true value, or if PERL_MM_MANIFEST_DEBUG is true, debugging output will be produced. πŸ›

πŸ’… DIAGNOSTICS πŸ’…

All diagnostic output is sent to "STDERR". Every last bit of it.

  • "Not in MANIFEST:" file β€” is reported if a file is found which is not in MANIFEST.
  • "Skipping" file β€” is reported if a file is skipped due to an entry in MANIFEST.SKIP.
  • "No such file:" file β€” is reported if a file mentioned in a MANIFEST file does not exist.
  • "MANIFEST:" $! β€” is reported if MANIFEST could not be opened. 😭
  • "Added to MANIFEST:" file β€” is reported by mkmanifest() if $Verbose is set and a file is added to MANIFEST. $Verbose is set to 1 by default.

🌸 ENVIRONMENT 🌸

  • PERL_MM_MANIFEST_DEBUG β€” Turns on debugging πŸ›βœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

ExtUtils::MakeMaker β€” which has handy targets for most of the functionality. Go say hi, it's mutuals bestie 🫢


πŸ’– AUTHOR πŸ’–

Andreas Koenig "andreas.koenig@anima.de"

Currently maintained by the Perl Toolchain Gang. πŸ‘‘


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. 🌈


okay that's the whole thing, you ate that read πŸ’… and for the record this page said its goodbyes from perl v5.44.0 on 2026-10-17 β€” mwah, go write your MANIFEST bestie 🫢✨

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms