1Test::Dist::VersionSyncU(s3e)r Contributed Perl DocumentaTteisotn::Dist::VersionSync(3)
2
3
4
6 Test::Dist::VersionSync - Verify that all the modules in a distribution
7 have the same version number.
8
10 Version 1.2.0
11
13 use Test::Dist::VersionSync;
14 Test::Dist::VersionSync::ok_versions();
15
17 The most common use should be to add a module_versions.t file to your
18 tests directory for a given distribution, with the following content:
19
20 #!perl -T
21
22 use strict;
23 use warnings;
24
25 use Test::More;
26
27 # Ensure a recent version of Test::Dist::VersionSync
28 my $version_min = '1.0.1';
29 eval "use Test::Dist::VersionSync $version_min";
30 plan( skip_all => "Test::Dist::VersionSync $version_min required for testing module versions in the distribution." )
31 if $@;
32
33 Test::Dist::VersionSync::ok_versions();
34
36 ok_versions()
37 Verify that all the Perl modules in the distribution have the same
38 version number.
39
40 # Default, use MANIFEST and MANIFEST.SKIP to find out what modules exist.
41 ok_versions();
42
43 # Optional, specify a list of modules to check for identical versions.
44 ok_versions(
45 modules =>
46 [
47 'Test::Module1',
48 'Test::Module2',
49 'Test::Module3',
50 ],
51 );
52
53 import()
54 Import a test plan. This uses the regular Test::More plan options.
55
56 use Test::Dist::VersionSync tests => 4;
57
58 ok_versions();
59
60 Test::Dist::VersionSync also detects if Test::More was already used
61 with a test plan declared and will piggyback on it. For example:
62
63 use Test::More tests => 2;
64 use Test::Dist::VersionSync;
65
66 ok( 1, 'Some Test' );
67 ok_versions();
68
70 Please report any bugs or feature requests through the web interface at
71 <https://github.com/guillaumeaubert/Test-Dist-VersionSync/issues/new>.
72 I will be notified, and then you'll automatically be notified of
73 progress on your bug as I make changes.
74
76 You can find documentation for this module with the perldoc command.
77
78 perldoc Test::Dist::VersionSync
79
80 You can also look for information at:
81
82 · GitHub's request tracker
83
84 <https://github.com/guillaumeaubert/Test-Dist-VersionSync/issues>
85
86 · AnnoCPAN: Annotated CPAN documentation
87
88 <http://annocpan.org/dist/test-dist-versionsync>
89
90 · CPAN Ratings
91
92 <http://cpanratings.perl.org/d/test-dist-versionsync>
93
94 · MetaCPAN
95
96 <https://metacpan.org/release/Test-Dist-VersionSync>
97
99 Guillaume Aubert <https://metacpan.org/author/AUBERTG>, "<aubertg at
100 cpan.org>".
101
103 Copyright 2012-2017 Guillaume Aubert.
104
105 This code is free software; you can redistribute it and/or modify it
106 under the same terms as Perl 5 itself.
107
108 This program is distributed in the hope that it will be useful, but
109 WITHOUT ANY WARRANTY; without even the implied warranty of
110 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE
111 file for more details.
112
113
114
115perl v5.30.1 2020-01-30 Test::Dist::VersionSync(3)