Guillaume Aubert > Test-Dist-VersionSync-1.1.0 > Test::Dist::VersionSync

Download:
Test-Dist-VersionSync-1.1.0.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: v1.1.0   Source   Latest Release: Test-Dist-VersionSync-v1.1.4

NAME ^

Test::Dist::VersionSync - Verify that all the modules in a distribution have the same version number.

VERSION ^

Version 1.1.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();

AUTHOR ^

Guillaume Aubert, <aubertg at cpan.org>.

BUGS ^

Please report any bugs or feature requests to bug-test-dist-versionsync at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=test-dist-versionsync. 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:

COPYRIGHT & LICENSE ^

Copyright 2012 Guillaume Aubert.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

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 GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

syntax highlighting: