NAME
Test::Dist::VersionSync - Verify that all the modules in a distribution have the same version number.
VERSION
Version 1.2.0
SYNOPSIS
use Test::Dist::VersionSync;
Test::Dist::VersionSync::ok_versions();
USE AS A TEST FILE
The most common use should be to add a module_versions.t file to your tests directory for a given distribution, with the following content:
#!perl -T
use strict;
use warnings;
use Test::More;
# Ensure a recent version of Test::Dist::VersionSync
my $version_min = '1.0.1';
eval "use Test::Dist::VersionSync $version_min";
plan( skip_all => "Test::Dist::VersionSync $version_min required for testing module versions in the distribution." )
if $@;
Test::Dist::VersionSync::ok_versions();
FUNCTIONS
ok_versions()
Verify that all the Perl modules in the distribution have the same version number.
# Default, use MANIFEST and MANIFEST.SKIP to find out what modules exist.
ok_versions();
# Optional, specify a list of modules to check for identical versions.
ok_versions(
modules =>
[
'Test::Module1',
'Test::Module2',
'Test::Module3',
],
);
import()
Import a test plan. This uses the regular Test::More plan options.
use Test::Dist::VersionSync tests => 4;
ok_versions();
Test::Dist::VersionSync also detects if Test::More was already used with a test plan declared and will piggyback on it. For example:
use Test::More tests => 2;
use Test::Dist::VersionSync;
ok( 1, 'Some Test' );
ok_versions();
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/Test-Dist-VersionSync/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::Dist::VersionSync
You can also look for information at:
GitHub's request tracker
https://github.com/guillaumeaubert/Test-Dist-VersionSync/issues
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
MetaCPAN
AUTHOR
Guillaume Aubert, <aubertg at cpan.org>
.
COPYRIGHT & LICENSE
Copyright 2012-2017 Guillaume Aubert.
This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for more details.