Test::Dist::VersionSync - Verify that all the modules in a distribution have the same version number.
Version 1.2.0
use Test::Dist::VersionSync; Test::Dist::VersionSync::ok_versions();
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();
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 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();
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.
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
http://annocpan.org/dist/test-dist-versionsync
CPAN Ratings
http://cpanratings.perl.org/d/test-dist-versionsync
MetaCPAN
https://metacpan.org/release/Test-Dist-VersionSync
Guillaume Aubert, <aubertg at cpan.org>.
<aubertg at cpan.org>
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.
To install Test::Dist::VersionSync, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Dist::VersionSync
CPAN shell
perl -MCPAN -e shell install Test::Dist::VersionSync
For more information on module installation, please visit the detailed CPAN module installation guide.