[Rt-commit] rt branch, 4.0/version-shenanigans, updated. rt-4.0.0rc6-24-gdbc6e96
Kevin Falcone
falcone at bestpractical.com
Tue Mar 15 10:36:11 EDT 2011
The branch, 4.0/version-shenanigans has been updated
via dbc6e96b19a9545fe415cc348aad84668b315814 (commit)
from e2f269e5c991d716d0e815ab379b35871a84b443 (commit)
Summary of changes:
lib/RT.pm | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit dbc6e96b19a9545fe415cc348aad84668b315814
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue Mar 15 10:32:28 2011 -0400
Update docs after further discussion and exploration
Tom pointed out why version.pm was dying silently some of the time and
made it appear that VERSION wasn't getting called, so I've updated the
docs to reflect that.
We *could* rewrite this to check whether or not our version is parsable
before overriding UNIVERSAL::VERSION but somehow that seems worse than
the current code. We know we use version numbers that are incompatible
with perl version numbers, but we aren't going to stop naming things rc1
at this point.
diff --git a/lib/RT.pm b/lib/RT.pm
index cb1ba4e..c39a271 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -797,11 +797,14 @@ if (0) {
use RT::Generated; our $VERSION = $RT::VERSION;
}
-# Unfortunately, auto_install doesn't use the above version hack, it wants to
-# require RT; RT->VERSION but that doesn't seem to pick up the LoadGeneratedData
-# import into RT::VERSION. Also, in perl 5.12, version parsing is stricter and
-# versions like 4.0.0rc6 or 4.0.0-22-g12345a die during the compare, so we strip
-# off cruft to make it happier. I wonder what this breaks.
+# Unfortunately, auto_install doesn't use the above version hack, it
+# wants to eval { require RT; RT->VERSION }. UNIVERSAL::VERSION demands
+# that $RT::VERSION be parsable by the is_lax version.pm method. Our
+# version numbers often aren't parsable (since we grab them from git
+# describe --tags). During a normal stable release of RT,
+# UNIVERSAL::VERSION will work and parse 4.0.0 or 4.0.1, but we provide
+# a redefinition of UNVERSAL::VERSION to clean up our version numbers
+# and make them compliant with the perl toolchain.
sub VERSION {
my $version = $RT::VERSION;
$version =~ s/rc|pre|alpha/_/;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list