1Test::CheckManifest(3)User Contributed Perl DocumentationTest::CheckManifest(3)
2
3
4
6 Test::CheckManifest - Check if your Manifest matches your distro
7
9 version 1.42
10
12 use Test::CheckManifest;
13 ok_manifest();
14
15 EXPORT
16 There is only one method exported: "ok_manifest"
17
19 ok_manifest [{exclude => $arref}][$msg]
20 checks whether the Manifest file matches the distro or not. To match a
21 distro the Manifest has to name all files that come along with the
22 distribution.
23
24 To check the Manifest file, this module searches for a file named
25 "MANIFEST".
26
27 To exclude some directories from this test, you can specify these dirs
28 in the hashref.
29
30 ok_manifest({exclude => ['/var/test/']});
31
32 is ok if the files in "/path/to/your/dist/var/test/" are not named in
33 the "MANIFEST" file. That means that the paths in the exclude array
34 must be "pseudo-absolute" (absolute to your distribution).
35
36 To use a "filter" you can use the key "filter"
37
38 ok_manifest({filter => [qr/\.svn/]});
39
40 With that you can exclude all files with an '.svn' in the filename or
41 in the path from the test.
42
43 These files would be excluded (as examples):
44
45 • /dist/var/.svn/test
46
47 • /dist/lib/test.svn
48
49 You can also combine "filter" and "exclude" with 'and' or 'or' default
50 is 'or':
51
52 ok_manifest({exclude => ['/var/test'],
53 filter => [qr/\.svn/],
54 bool => 'and'});
55
56 These files have to be named in the "MANIFEST":
57
58 • /var/foo/.svn/any.file
59
60 • /dist/t/file.svn
61
62 • /var/test/test.txt
63
64 These files not:
65
66 • /var/test/.svn/*
67
68 • /var/test/file.svn
69
70 By default, "ok_manifest" will look for the file "MANIFEST" in the
71 current working directory (which is how tests are traditionally run).
72 If you wish to specify a different directory, you may pass the "file"
73 or "dir" parameters, for example:
74
75 ok_manifest({dir => '/path/to/my/dist/'});
76
78 Beside "filter" and "exclude" there is another way to exclude files:
79 "MANIFEST.SKIP". This is a file with filenames that should be excluded:
80
81 t/my_very_own.t
82 file_to.skip
83
85 You can replace the test scripts using "Test::CheckManifest" with this
86 one using ExtUtils::Manifest.
87
88 use Test::More tests => 2;
89 use ExtUtils::Manifest;
90
91 is_deeply [ ExtUtils::Manifest::manicheck() ], [], 'missing';
92 is_deeply [ ExtUtils::Manifest::filecheck() ], [], 'extra';
93
94 (thanks to @mohawk2 <https://github.com/reneeb/Test-
95 CheckManifest/issues/20>).
96
98 Great thanks to Christopher H. Laco, who did a lot of testing stuff for
99 me and he reported some bugs to RT.
100
102 Renee Baecker <reneeb@cpan.org>
103
105 This software is Copyright (c) 2018 by Renee Baecker.
106
107 This is free software, licensed under:
108
109 The Artistic License 2.0 (GPL Compatible)
110
111
112
113perl v5.34.0 2021-07-23 Test::CheckManifest(3)