From ef41af2c0d52100410d9b057e591b49988b77617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Fri, 30 Aug 2019 11:15:38 +0200 Subject: [PATCH] Fix typo in pod example for comparing versions. The example in version.pod for comparing versions line #227 says "FALSE" but it should be "TRUE" since v.95.0 < v.960.0. But if we fix it to "TRUE", it does not illustrate the trap very well, so I changed the wording a little bit. --- lib/version.pod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/version.pod b/lib/version.pod index 9f3b27d0f4af..274868508e39 100644 --- a/lib/version.pod +++ b/lib/version.pod @@ -224,11 +224,11 @@ term will be converted to a version object using C. This may give surprising results: $v1 = version->parse("v0.95.0"); - $bool = $v1 < 0.96; # FALSE since 0.96 is v0.960.0 + $bool = $v1 < 0.94; # TRUE since 0.94 is v0.940.0 Always comparing to a version object will help avoid surprises: - $bool = $v1 < version->parse("v0.96.0"); # TRUE + $bool = $v1 < version->parse("v0.94.0"); # FALSE Note that "alpha" version objects (where the version string contains a trailing underscore segment) compare as less than the equivalent