1ExtUtils::Manifest(3pm)Perl Programmers Reference GuideExtUtils::Manifest(3pm)
2
3
4

NAME

6       ExtUtils::Manifest - utilities to write and check a MANIFEST file
7

SYNOPSIS

9           use ExtUtils::Manifest qw(...funcs to import...);
10
11           mkmanifest();
12
13           my @missing_files    = manicheck;
14           my @skipped          = skipcheck;
15           my @extra_files      = filecheck;
16           my($missing, $extra) = fullcheck;
17
18           my $found    = manifind();
19
20           my $manifest = maniread();
21
22           manicopy($read,$target);
23
24           maniadd({$file => $comment, ...});
25

DESCRIPTION

27       Functions
28
29       ExtUtils::Manifest exports no functions by default.  The following are
30       exported on request
31
32       mkmanifest
33               mkmanifest();
34
35           Writes all files in and below the current directory to your MANI‐
36           FEST.  It works similar to
37
38               find . > MANIFEST
39
40           All files that match any regular expression in a file MANIFEST.SKIP
41           (if it exists) are ignored.
42
43           Any existing MANIFEST file will be saved as MANIFEST.bak.  Lines
44           from the old MANIFEST file is preserved, including any comments
45           that are found in the existing MANIFEST file in the new one.
46
47       manifind
48               my $found = manifind();
49
50           returns a hash reference. The keys of the hash are the files found
51           below the current directory.
52
53       manicheck
54               my @missing_files = manicheck();
55
56           checks if all the files within a "MANIFEST" in the current direc‐
57           tory really do exist. If "MANIFEST" and the tree below the current
58           directory are in sync it silently returns an empty list.  Otherwise
59           it returns a list of files which are listed in the "MANIFEST" but
60           missing from the directory, and by default also outputs these names
61           to STDERR.
62
63       filecheck
64               my @extra_files = filecheck();
65
66           finds files below the current directory that are not mentioned in
67           the "MANIFEST" file. An optional file "MANIFEST.SKIP" will be con‐
68           sulted. Any file matching a regular expression in such a file will
69           not be reported as missing in the "MANIFEST" file. The list of any
70           extraneous files found is returned, and by default also reported to
71           STDERR.
72
73       fullcheck
74               my($missing, $extra) = fullcheck();
75
76           does both a manicheck() and a filecheck(), returning then as two
77           array refs.
78
79       skipcheck
80               my @skipped = skipcheck();
81
82           lists all the files that are skipped due to your "MANIFEST.SKIP"
83           file.
84
85       maniread
86               my $manifest = maniread();
87               my $manifest = maniread($manifest_file);
88
89           reads a named "MANIFEST" file (defaults to "MANIFEST" in the cur‐
90           rent directory) and returns a HASH reference with files being the
91           keys and comments being the values of the HASH.  Blank lines and
92           lines which start with "#" in the "MANIFEST" file are discarded.
93
94       manicopy
95               manicopy(\%src, $dest_dir);
96               manicopy(\%src, $dest_dir, $how);
97
98           Copies the files that are the keys in %src to the $dest_dir.  %src
99           is typically returned by the maniread() function.
100
101               manicopy( maniread(), $dest_dir );
102
103           This function is useful for producing a directory tree identical to
104           the intended distribution tree.
105
106           $how can be used to specify a different methods of "copying".
107           Valid values are "cp", which actually copies the files, "ln" which
108           creates hard links, and "best" which mostly links the files but
109           copies any symbolic link to make a tree without any symbolic link.
110           "cp" is the default.
111
112       maniadd
113             maniadd({ $file => $comment, ...});
114
115           Adds an entry to an existing MANIFEST unless its already there.
116
117           $file will be normalized (ie. Unixified).  UNIMPLEMENTED
118
119       MANIFEST
120
121       A list of files in the distribution, one file per line.  The MANIFEST
122       always uses Unix filepath conventions even if you're not on Unix.  This
123       means foo/bar style not foo\bar.
124
125       Anything between white space and an end of line within a "MANIFEST"
126       file is considered to be a comment.  Any line beginning with # is also
127       a comment.
128
129           # this a comment
130           some/file
131           some/other/file            comment about some/file
132
133       MANIFEST.SKIP
134
135       The file MANIFEST.SKIP may contain regular expressions of files that
136       should be ignored by mkmanifest() and filecheck(). The regular expres‐
137       sions should appear one on each line. Blank lines and lines which start
138       with "#" are skipped.  Use "\#" if you need a regular expression to
139       start with a "#".
140
141       For example:
142
143           # Version control files and dirs.
144           \bRCS\b
145           \bCVS\b
146           ,v$
147           \B\.svn\b
148
149           # Makemaker generated files and dirs.
150           ^MANIFEST\.
151           ^Makefile$
152           ^blib/
153           ^MakeMaker-\d
154
155           # Temp, old and emacs backup files.
156           ~$
157           \.old$
158           ^#.*#$
159           ^\.#
160
161       If no MANIFEST.SKIP file is found, a default set of skips will be used,
162       similar to the example above.  If you want nothing skipped, simply make
163       an empty MANIFEST.SKIP file.
164
165       EXPORT_OK
166
167       &mkmanifest, &manicheck, &filecheck, &fullcheck, &maniread, and &mani‐
168       copy are exportable.
169
170       GLOBAL VARIABLES
171
172       $ExtUtils::Manifest::MANIFEST defaults to "MANIFEST". Changing it
173       results in both a different "MANIFEST" and a different "MANIFEST.SKIP"
174       file. This is useful if you want to maintain different distributions
175       for different audiences (say a user version and a developer version
176       including RCS).
177
178       $ExtUtils::Manifest::Quiet defaults to 0. If set to a true value, all
179       functions act silently.
180
181       $ExtUtils::Manifest::Debug defaults to 0.  If set to a true value, or
182       if PERL_MM_MANIFEST_DEBUG is true, debugging output will be produced.
183

DIAGNOSTICS

185       All diagnostic output is sent to "STDERR".
186
187       "Not in MANIFEST:" file
188           is reported if a file is found which is not in "MANIFEST".
189
190       "Skipping" file
191           is reported if a file is skipped due to an entry in "MANI‐
192           FEST.SKIP".
193
194       "No such file:" file
195           is reported if a file mentioned in a "MANIFEST" file does not
196           exist.
197
198       "MANIFEST:" $!
199           is reported if "MANIFEST" could not be opened.
200
201       "Added to MANIFEST:" file
202           is reported by mkmanifest() if $Verbose is set and a file is added
203           to MANIFEST. $Verbose is set to 1 by default.
204

ENVIRONMENT

206       PERL_MM_MANIFEST_DEBUG
207           Turns on debugging
208

SEE ALSO

210       ExtUtils::MakeMaker which has handy targets for most of the functional‐
211       ity.
212

AUTHOR

214       Andreas Koenig "andreas.koenig@anima.de"
215
216       Currently maintained by Michael G Schwern "schwern@pobox.com"
217
218
219
220perl v5.8.8                       2001-09-21           ExtUtils::Manifest(3pm)
Impressum