NAME
Test::GreaterVersion -- Did you update the VERSION?
SYNOPSIS
has_greater_version('My::Module');
has_greater_version_than_cpan('My::Module');
DESCRIPTION
You might have forgotten to update the version of your module. This module provides two tests to check that.
has_greater_version
checks if your module source has a greater VERSION number than the version installed in the system.
has_greater_version_than_cpan
checks if your module source has a greater VERSION number than the version found on CPAN.
The version is checked by looking for the VERSION scalar in the module. The names of these two functions are always exported.
has_greater_version ($module)
Returns 1 if the version of your module in 'lib/' is greater than the version of the installed module, 0 otherwise.
has_greater_version_than_cpan ($module)
Returns 1 if the version of your module in 'lib/' is greater than the version on CPAN, 0 otherwise.
_get_installed_version ($module)
Gets the version of the installed module. Just calls eval() and tries to find the version afterwards.
Returns 0 if use
cannot find the module or it has no VERSION. Returns the version otherwise.
_get_version_from_lib ($module)
Gets the version of the module found in 'lib/'. Transforms the module name into a filename which points to a file found under 'lib/'.
Returns 0 if the module could not be loaded or has no VERSION. Returns the version otherwise.
_get_version_from_cpan ($module)
Gets the module's version as found on CPAN. The version information is found with the help of the CPAN module.
Returns 0 if the module is not on CPAN or the CPAN module failed somehow. Returns the version otherwise.
BUGS
The double-colons are replaced by with slashes. This works only on UNI*-like systems.
NOTES
This module was inspired by brian d foy's talk 'Managing Complexity with Module::Release' at the Nordic Perl Workshop in 2006.
AUTHOR
Gregor Goldbach <glauschwuffel@nomaden.org>
SIMILAR MODULES
Test::Version tests if there is a VERSION defined.
Test::HasVersion does it, too, but has the ability to check all Perl modules in lib
.
Neiter of these compare versions.
COPYRIGHT
Copyright (c) 2007 by Gregor Goldbach. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.