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