Test::...ionSync(3pm)

πŸ“¦
version 1.2.0 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Test::Dist::VersionSync β€” bestie, this lil module verifies that all the modules in a distribution have the same version number. no cap. ✨


🌸 VERSION 🌸

Version 1.2.0 πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so like, the absolute bare minimum vibe is this:

use Test::Dist::VersionSync;
Test::Dist::VersionSync::ok_versions();

that's it. that's the whole thing. slay. πŸ’…


πŸ’œ USE AS A TEST FILE πŸ’œ

the most common way you're gonna use this is to add a module_versions.t file to your tests directory for a given distribution, with this content inside:

#!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();

it's giving "responsible test author" energy fr fr 🫢


⭐ FUNCTIONS ⭐

πŸŽ€ ok_versions()

verify that all the Perl modules in the distribution have the same version number. that's the whole job. iconic.

# 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',
        ],
);

so like, by default it sniffs out what modules exist using MANIFEST and MANIFEST.SKIP πŸ‘€. and if you want, you can also hand it an explicit list of modules to check for identical versions instead. your call bestie.

πŸ¦„ import()

import a test plan. this one uses the regular Test::More plan options, so you already know the drill.

use Test::Dist::VersionSync tests => 4;

ok_versions();

and here's the cute part: Test::Dist::VersionSync also detects if Test::More was already used with a test plan declared, and it will piggyback on it. like it just hops on for the ride. for example:

use Test::More tests => 2;
use Test::Dist::VersionSync;

ok( 1, 'Some Test' );
ok_versions();

no duplicate plans, no drama. periodt. πŸ‘‘


😭 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. so like, you file it, he sees it, you get updates. the full loop. πŸ’Œ


🌈 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

<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>


πŸ’« AUTHOR πŸ’«

Guillaume Aubert <https://metacpan.org/author/AUBERTG>, "<aubertg at cpan.org>". king behavior honestly πŸ‘‘


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.

okay that's the whole page bestie, mwah πŸ’‹ β€” this was perl v5.42.0, dated 2025-07-25, and it's the Test::...ionSync(3pm) page from the User Contributed Perl Documentation. go forth and sync those versions πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from