
Test::DistManifest - Verify MANIFEST/MANIFEST.SKIP as an author test

Version 1.2.2 ($Id: DistManifest.pm 7100 2009-05-15 14:25:59Z FREQUENCY@cpan.org $)

By default, this module exports the following functions:

This module provides a simple method of testing that a MANIFEST matches the distribution.
It tests three things:

use Test::More;
eval 'use Test::DistManifest';
if ($@) {
plan skip_all => 'Test::DistManifest required to test MANIFEST';
}
manifest_ok('MANIFEST', 'MANIFEST.SKIP'); # Default options
manifest_ok(); # Functionally equivalent to above

This module was tested under Perl 5.10.0, using Debian Linux. However, because it's Pure Perl and doesn't do anything too obscure, it should be compatible with any version of Perl that supports its prerequisite modules.
If you encounter any problems on a different version or architecture, please contact the maintainer.

This subroutine checks the manifest list contained in $manifest by using Module::Manifest to determine the list of files and then checking for the existence of all such files. Then, it checks if there are any files in the distribution that were not specified in the $manifest file but do not match any regular expressions provided in the $skipfile exclusion file.
If your MANIFEST file is generated by ExtUtils::MakeMaker or Module::Build, then you shouldn't have any problems with these files. It's just a helpful test to remind you to update these files, using:
$ make dist # For ExtUtils::MakeMaker $ ./Build dist # For Module::Build
By default, errors in the MANIFEST or MANIFEST.SKIP files are treated as fatal, which really is the purpose of using Test::DistManifest as part of your author test suite.
In some cases this is not desirable behaviour, such as with the Debian Perl Group, which runs all tests - including author tests - as part of its module packaging process. This wreaks havoc because Debian adds its control files in debian/ downstream, and that directory or its files are generally not in MANIFEST.SKIP.
By setting the environment variable MANIFEST_WARN_ONLY to a true value, errors will be non-fatal - they show up as diagnostic messages only, but all tests pass from the perspective of Test::Harness.
This can be used in a test script as:
$ENV{MANIFEST_WARN_ONLY} = 1;
or from other shell scripts as:
export MANIFEST_WARN_ONLY=1
Note that parsing errors in each file (MANIFEST and MANIFEST.SKIP) and circular dependencies will always be considered fatal. The author is not aware of any other use cases where other behaviour would be useful.

This module internally plans 5 tests:
Module::ManifestIf you want to run tests on multiple different MANIFEST files, you can simply pass 'no_plan' to the import function, like so:
use Test::DistManifest 'no_plan';
# Multiple tests work properly now
manifest_ok('MANIFEST', 'MANIFEST.SKIP');
manifest_ok();
manifest_ok('MANIFEST.OTHER', 'MANIFEST.SKIP');
I doubt this will be useful to users of this module. However, this is used internally for testing and it might be helpful to you. You can also plan more tests, but keep in mind that the idea of "3 internal tests" may change in the future.
Example code:
use Test::DistManifest tests => 5; manifest_ok(); # 4 tests ok(1, 'is 1 true?');

Jonathan Yu <frequency@cpan.org>
Your name here ;-)


You can find documentation for this module with the perldoc command.
perldoc Test::DistManifest
You can also look for information at:

You can access the most recent development version of this module at:
http://svn.ali.as/cpan/trunk/Test-DistManifest
If you are a CPAN developer and would like to make modifications to the code base, please contact Adam Kennedy <adamk@cpan.org>, the repository administrator. I only ask that you contact me first to discuss the changes you wish to make to the distribution.

Please send relevant comments, rotten tomatoes and suggestions directly to the maintainer noted above.
If you have a bug report or feature request, please file them on the CPAN Request Tracker at http://rt.cpan.org. If you are able to submit your bug report in the form of failing unit tests, you are strongly encouraged to do so.

Test::CheckManifest, a module providing similar functionality

There are no known bugs as of this release.

Copyright (C) 2008-2009 by Jonathan Yu <frequency@cpan.org>
This package is distributed under the same terms as Perl itself. Please see the LICENSE file included in this distribution for full details of these terms.

This software is provided by the copyright holders and contributors "AS IS" and ANY EXPRESS OR IMPLIED WARRANTIES, including, but not limited to, the IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.