|
NAMETest::Version - Check to see that version's in modules are saneVERSIONversion 2.09SYNOPSISuse Test::More; use Test::Version 1.001001 qw( version_all_ok ), { is_strict => 0, has_version => 1, consistent => 1, }; # test blib or lib by default version_all_ok(); done_testing; DESCRIPTIONThis module's goal is to be a one stop shop for checking to see that your versions across your dist are sane. Please ensure that you use version 0.04 or later only, as earlier versions are old code and may not work correctly. Current feature list:
FUNCTIONSversion_okversion_ok( $filename, [ $name ] ); Test a single ".pm" file by passing a path to the function. Checks if the module has a version, and that it is valid with "is_lax". version_all_okversion_all_ok( [ $directory, [ $name ]] ); Test all modules in a directory with "version_ok". By default it will check "blib" or "lib" if you haven't passed it a directory. CONFIGURATION AND ENVIRONMENThas_versionuse Test::Version qw( version_all_ok ), { has_version => 0 }; Allows disabling whether a module has to have a version. If set to 0 version tests will be skipped in any module where no version is found. really doesn't make sense to use with just version_ok is_strictuse Test::Version { is_strict => 1 }; this allows enabling of versions "is_strict" checks to ensure that your version is strict. consistentuse Test::Version { consistent => 1 }; Check if every module has the same version number. ignore_unindexableuse Test::Version { ignore_unindexable => 0}; if you have at least Module::Metadata v1.000020 Test::Version will by default skip any files not considered is_indexable filename_matchuse Test::Version 2.0 { filename_match => [qr{Foo/Bar.pm$}] }; Only test files that match the given pattern. Pattern may be a list of strings, regular expressions or code references. The filename will match if it matches one or more patterns.
multipleuse Test::Version 2.02 { multiple => 1 }; Test each version for each package if multiple packages are found in a file. SEE ALSOThe goal is to have the functionality of all of these.
If you are using Dist::Zilla there is a plugin
BUGSPlease report any bugs or feature requests on the bugtracker website <https://github.com/plicease/test-version/issues>When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. CONTRIBUTORS
AUTHORS
COPYRIGHT AND LICENSEThis software is Copyright (c) 2018 by Caleb Cushing.This is free software, licensed under: The Artistic License 2.0 (GPL Compatible)
Visit the GSP FreeBSD Man Page Interface. |