The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 1184
META.json 22
META.yml 22
README 18
lib/version/regex.pm 11
lib/version.pm 11
t/00impl-pp.t 11
t/01base.t 11
t/02derived.t 11
t/03require.t 11
t/05sigdie.t 11
t/06noop.t 11
t/07locale.t 11
t/08_corelist.t 11
t/09_list_util.t 11
vperl/vpp.pm 11
vutil/lib/version/vxs.pm 11
vutil/vutil.c 947
vutil/vxs.inc 11
19 files changed (This is a version diff) 29257
@@ -1,8 +1,191 @@
+2014-08-16  John Peacock  <john.peacock@havurah-software.org>
+
+	* .hgtags:
+	Tagging version '0.9909' using shipit.
+	[28f76b8d2918] [tip] <0.9909>
+
+2014-08-15  John Peacock  <john.peacock@havurah-software.org>
+
+	* README:
+	Update README
+	[d31021b57b62] [0.9909] <0.9909>
+
+	* lib/version.pm, lib/version/regex.pm, t/00impl-pp.t, t/01base.t,
+	t/02derived.t, t/03require.t, t/05sigdie.t, t/06noop.t,
+	t/07locale.t, t/08_corelist.t, t/09_list_util.t, vperl/vpp.pm,
+	vutil/lib/version/vxs.pm:
+	Bump $VERSION in preparation for CPAN release
+	[ff9b7da70a4b] <0.9909>
+
+	* vutil/vutil.c:
+	commit f57000bc399f9b433bfb06a4302f4e773f7f50bb Author: Karl
+	Williamson <khw@cpan.org> Date: Mon Aug 4 16:29:12 2014 -0600
+
+	 PATCH: [perl #121930] Bleadperl breaks MDOOTSON/Wx
+
+	 The root cause of this issue is that XS code or the libraries it
+	calls is changing the locale behind Perl's back so that the decimal
+	point character is not a dot. Version number parsing relies on it
+	being a dot.
+
+	 This patch fixes the problem by retrieving the current locale just
+	before version number parsing, and updating Perl's records if the
+	locale has changed away from what is expected. Given accurate
+	records, the pre-existing call to the
+	STORE_NUMERIC_LOCAL_SET_STANDARD macro will do what it's supposed to
+	do, and change the locale so that the dot is the radix character for
+	the version number parsing.
+
+	 After the parsing is done, the pre-existing call to the
+	RESTORE_NUMERIC_LOCAL macro will restore properly, but see below
+
+	 This patch should be suitable for both 5.20.1 and 5.21 (though the
+	SHA-1 value in the porting/customize.dat will have to be adjusted
+	because the files aren't otherwise identical). But there is a
+	fundamental difference between the releases. In 5.20.X, Perl does
+	not attempt to keep the radix character a dot at almost all times
+	(though it initializes things so it is a dot, overriding any
+	environmental settings to the contrary). This leads to known non-
+	regression bugs in 5.20 because very little XS code can cope with a
+	non-dot. To fix this, Perl has changed the macros in 5.21 so that
+	the result after the RESTORE_NUMERIC_LOCAL is that the current
+	locale will have a dot. This will fix those long-standing bugs where
+	XS code expecting a dot fails should it be mashed up with modules
+	that change it to something else. But this will break the relatively
+	few modules that want it the other way. So it has been done early in
+	5.21 to give things a chance to settle down.
+
+	 The extra {} braces around the code that calls the macros is
+	because STORE_NUMERIC_LOCAL_SET_STANDARD declares a variable, and so
+	must be within the declarations area of a block for C89 compilers.
+	(I myself would not write a macro that does this without indicating
+	so in its name.)
+	[2a4fc121c6c4] <0.9909>
+
+	* vutil/vutil.c, vutil/vxs.inc:
+	Apply patch from Perl 5.20.0 as released
+
+	commit 24120986965f248417d199c5818d145ea2a34607 Author: Brian Fraser
+	<fraserbn@gmail.com> Date: Tue Feb 4 06:38:55 2014 -0300
+
+	vutil.c, vxs.inc: Avoid warnings from -Wmissing-prototypes -Wundef
+	-Wunused-label
+	[08e9b0d7cca2] <0.9909>
+
+	* Preparatory branch for releasing custom 0.9909 for Perl 5.20.1
+	[79f970339680] <0.9909>
+
+	* t/coretests.pm:
+	Add a couple of overflow tests
+	[b150b244c13e]
+
+2014-06-21  John Peacock  <john.peacock@havurah-software.org>
+
+	* lib/version.pod:
+	POD correction. Thanks "Matthew Horsfall (alh)" <wolfsage@gmail.com>
+	Resolves https://rt.cpan.org/Ticket/Display.html?id=96620
+	[36eeed6fea2c]
+
+	* vutil/vutil.c:
+	Ignore unused context. Thanks to fraserbn@gmail.com Resolves
+	https://rt.cpan.org/Ticket/Display.html?id=96100
+	[3ac9f9bcc78e]
+
+	* vutil/vxs.inc:
+	Unreachable code. Thanks to Jarkko Hietaniemi <jhi@iki.fi> Resolves
+	https://rt.cpan.org/Ticket/Display.html?id=95896
+	[5aab343122fb]
+
+2014-05-26  John Peacock  <john.peacock@havurah-software.org>
+
+	* t/07locale.t:
+	Unintentionally skipping these tests since vpp.pm was included by
+	default.
+	[ad3699914825]
+
+2014-05-10  John Peacock  <john.peacock@havurah-software.org>
+
+	* vutil/vutil.c:
+	Use unsigned integer where appropriate
+	[2ff16e565b1d]
+
+	* t/07locale.t:
+	Remove debugging
+	[621c728ff110]
+
+2014-04-17  John Peacock  <john.peacock@havurah-software.org>
+
+	* README, t/07locale.t, t/coretests.pm, vperl/vpp.pm:
+	Revised heuristic in vpp to better handle v-strings
+	[14c5405a8ccd]
+
+	* README, t/coretests.pm, vperl/vpp.pm, vutil/vutil.c:
+	Forbid trailing bare decimal in dotted decimal versions. Resolves
+
+	 https://rt.cpan.org/Ticket/Display.html?id=93603
+	[690dfba7c43b]
+
+	* README, lib/version.pm, lib/version/regex.pm, t/00impl-pp.t,
+	t/01base.t, t/02derived.t, t/03require.t, t/05sigdie.t, t/06noop.t,
+	t/07locale.t, t/08_corelist.t, t/09_list_util.t, vperl/vpp.pm:
+	Start working on 0.9909 release
+	[7a5441bfe2b0]
+
+	* lib/version.pm, vperl/vpp.pm:
+	Protect usage of warn categories to supported Perl releases
+	[d5e4aa541780]
+
+2014-04-16  John Peacock  <john.peacock@havurah-software.org>
+
+	* vutil/vutil.c:
+	Add warnings to vutil code too
+	[8f94ebcb7bdc]
+
+2014-03-01  John Peacock  <john.peacock@havurah-software.org>
+
+	* lib/version.pm, t/coretests.pm, vperl/vpp.pm:
+	Add lossy warning for both numify() and normal() alpha versions
+	[591b0e507293]
+
+	* t/coretests.pm, vperl/vpp.pm, vutil/vutil.c:
+	Make alpha->normal() a lossy operation
+	[ababbdd1380f]
+
+2014-02-25  John Peacock  <john.peacock@havurah-software.org>
+
+	* lib/version.pm, t/coretests.pm, vperl/vpp.pm, vutil/vutil.c:
+	Forbid calling ->normal() on non-qv alpha versions
+	[ed0f3215c1ee]
+
+2014-02-04  John Peacock  <john.peacock@havurah-software.org>
+
+	* Makefile.PL:
+	Add META stanzas for bugtracker and repository
+	[47bb0ceaa783]
+
+	* README:
+	Revise README to document source repositories
+	[ca260e8255f1]
+
+2014-02-04  Brian Fraser  <fraserbn@gmail.com>
+
+	* vutil/vutil.c, vutil/vxs.inc:
+	Avoid warnings from -Wmissing-prototypes -Wundef -Wunused-label
+
+	-Wmissing-prototypes was complaining about declaring XS() functions
+	without previously declaring a prototype.
+
+	-Wundef didn't like using #if foo instead of #ifdef foo
+
+	-Wunused-label warned because VER_{IV,NM,PV} were defined on all
+	versions of perl, but only used on < 5.17.2
+	[a4171dd98d50]
+
 2014-02-03  John Peacock  <john.peacock@havurah-software.org>
 
 	* .hgtags:
 	Tagging version '0.9908' using shipit.
-	[2bb065d82876] [tip]
+	[2bb065d82876]
 
 2014-02-01  John Peacock  <john.peacock@havurah-software.org>
 
@@ -4,7 +4,7 @@
       "John Peacock <jpeacock@cpan.org>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.84, CPAN::Meta::Converter version 2.120351",
+   "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.120921",
    "license" : [
       "perl_5"
    ],
@@ -41,5 +41,5 @@
       }
    },
    "release_status" : "stable",
-   "version" : "0.9908"
+   "version" : "0.9909"
 }
@@ -7,7 +7,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: 0
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.84, CPAN::Meta::Converter version 2.120351'
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.120921'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -23,4 +23,4 @@ requires:
   Test::More: 0.45
   parent: 0.221
   perl: 5.006002
-version: 0.9908
+version: 0.9909
@@ -1,4 +1,4 @@
-version 0.9908
+version 0.9909
 ==================================
 
 Full version object support, with patch for bug in Perl 5.10.0 core
@@ -13,6 +13,13 @@ IMPORTANT NOTE - 0.9906 is the last release that fully supports Perl
 releases prior to 5.6.2.  It is just too much trouble to continue to
 fight to maintain full backward compatibility.
 
+Major Changes in 0.9909 - 2014-08-15
+=====================================
+Compatibility release for Perl 5.20.1.  Apply two patches from bleadperl
+(one which shipped with 5.20.0 and one from bleadperl) so that a clean
+release can be applied prior to 5.20.1 being shipped.  Holding back a few
+other improvements, so expect 0.9910 shortly.
+
 Major Changes in 0.9908 - 2014-02-02
 =====================================
 More optimizations courtesy of Daniel Dragan (bulk88@hotmail.com).
@@ -4,7 +4,7 @@ use strict;
 
 use vars qw($VERSION $CLASS $STRICT $LAX);
 
-$VERSION = 0.9908;
+$VERSION = 0.9909;
 
 #--------------------------------------------------------------------------#
 # Version regexp components
@@ -6,7 +6,7 @@ use strict;
 
 use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
 
-$VERSION = 0.9908;
+$VERSION = 0.9909;
 $CLASS = 'version';
 
 # !!!!Delete this next block completely when adding to Perl core!!!!
@@ -9,7 +9,7 @@ use Test::More qw/no_plan/;
 BEGIN {
     (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm';
     require $coretests;
-    use_ok('version::vpp', 0.9908);
+    use_ok('version::vpp', 0.9909);
 }
 
 BaseTests("version::vpp","new","qv");
@@ -9,7 +9,7 @@ use Test::More qw/no_plan/;
 BEGIN {
     (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm';
     require $coretests;
-    use_ok('version', 0.9908);
+    use_ok('version', 0.9909);
 }
 
 BaseTests("version","new","qv");
@@ -10,7 +10,7 @@ use File::Temp qw/tempfile/;
 BEGIN {
     (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm';
     require $coretests;
-    use_ok("version", 0.9908);
+    use_ok("version", 0.9909);
     # If we made it this far, we are ok.
 }
 
@@ -14,7 +14,7 @@ BEGIN {
 # Don't want to use, because we need to make sure that the import doesn't
 # fire just yet (some code does this to avoid importing qv() and delare()).
 require_ok("version");
-is $version::VERSION, 0.9908, "Make sure we have the correct class";
+is $version::VERSION, 0.9909, "Make sure we have the correct class";
 ok(!"main"->can("qv"), "We don't have the imported qv()");
 ok(!"main"->can("declare"), "We don't have the imported declare()");
 
@@ -14,7 +14,7 @@ BEGIN {
 }
 
 BEGIN {
-    use version 0.9908;
+    use version 0.9909;
 }
 
 pass "Didn't get caught by the wrong DIE handler, which is a good thing";
@@ -7,7 +7,7 @@
 use Test::More qw/no_plan/;
 
 BEGIN {
-    use_ok('version', 0.9908);
+    use_ok('version', 0.9909);
 }
 
 my $v1 = version->new('1.2');
@@ -11,7 +11,7 @@ use Test::More tests => 7;
 use Config;
 
 BEGIN {
-    use_ok('version', 0.9908);
+    use_ok('version', 0.9909);
 }
 
 SKIP: {
@@ -5,7 +5,7 @@
 #########################
 
 use Test::More tests => 3;
-use_ok("version", 0.9908);
+use_ok("version", 0.9909);
 
 # do strict lax tests in a sub to isolate a package to test importing
 SKIP: {
@@ -4,7 +4,7 @@
 #########################
 
 use strict;
-use_ok("version", 0.9908);
+use_ok("version", 0.9909);
 use Test::More;
 
 BEGIN {
@@ -122,7 +122,7 @@ use strict;
 
 use Config;
 use vars qw($VERSION $CLASS @ISA $LAX $STRICT);
-$VERSION = 0.9908;
+$VERSION = 0.9909;
 $CLASS = 'version::vpp';
 
 require version::regex;
@@ -5,7 +5,7 @@ use v5.10;
 use strict;
 
 use vars qw(@ISA $VERSION $CLASS );
-$VERSION = 0.9908;
+$VERSION = 0.9909;
 $CLASS = 'version::vxs';
 
 eval {
@@ -28,7 +28,7 @@ some time when tokenizing.
 =cut
 */
 const char *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_prescan_version2(pTHX_ const char *s, bool strict,
 #else
 Perl_prescan_version(pTHX_ const char *s, bool strict,
@@ -259,7 +259,7 @@ it doesn't.
 */
 
 const char *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_scan_version2(pTHX_ const char *s, SV *rv, bool qv)
 #else
 Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
@@ -453,7 +453,7 @@ want to upgrade the SV.
 */
 
 SV *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_new_version2(pTHX_ SV *ver)
 #else
 Perl_new_version(pTHX_ SV *ver)
@@ -543,7 +543,7 @@ to force this SV to be interpreted as an "extended" version.
 */
 
 SV *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_upg_version2(pTHX_ SV *ver, bool qv)
 #else
 Perl_upg_version(pTHX_ SV *ver, bool qv)
@@ -571,13 +571,17 @@ Perl_upg_version(pTHX_ SV *ver, bool qv)
 		       "Integer overflow in version %d",VERSION_MAX);
     }
     else if ( SvUOK(ver) || SvIOK(ver))
+#if PERL_VERSION_LT(5,17,2)
 VER_IV:
+#endif
     {
 	version = savesvpv(ver);
 	SAVEFREEPV(version);
     }
     else if (SvNOK(ver) && !( SvPOK(ver) && SvCUR(ver) == 3 ) )
+#if PERL_VERSION_LT(5,17,2)
 VER_NV:
+#endif
     {
 	STRLEN len;
 
@@ -585,6 +589,37 @@ VER_NV:
 	char tbuf[64];
 	SV *sv = SvNVX(ver) > 10e50 ? newSV(64) : 0;
 	char *buf;
+#ifdef USE_LOCALE_NUMERIC
+        const char * const cur_numeric = setlocale(LC_NUMERIC, NULL);
+        assert(cur_numeric);
+
+        /* XS code can set the locale without us knowing.  To protect the
+         * version number parsing, which requires the radix character to be a
+         * dot, update our records as to what the locale is, so that our
+         * existing macro mechanism can correctly change it to a dot and back
+         * if necessary.  This code is extremely unlikely to be in a loop, so
+         * the extra work will have a negligible performance impact.  See [perl
+         * #121930].
+         *
+         * If the current locale is a standard one, but we are expecting it to
+         * be a different, underlying locale, update our records to make the
+         * underlying locale this (standard) one.  If the current locale is not
+         * a standard one, we should be expecting a non-standard one, the same
+         * one that we have recorded as the underlying locale.  If not, update
+         * our records. */
+        if (strEQ(cur_numeric, "C") || strEQ(cur_numeric, "POSIX")) {
+            if (! PL_numeric_standard) {
+                new_numeric(cur_numeric);
+            }
+        }
+        else if (PL_numeric_standard
+                 || ! PL_numeric_name
+                 || strNE(PL_numeric_name, cur_numeric))
+        {
+            new_numeric(cur_numeric);
+        }
+#endif
+        { /* Braces needed because macro just below declares a variable */
         STORE_NUMERIC_LOCAL_SET_STANDARD();
 	if (sv) {
 	    Perl_sv_catpvf(aTHX_ sv, "%.9"NVff, SvNVX(ver));
@@ -596,6 +631,7 @@ VER_NV:
 	    buf = tbuf;
 	}
         RESTORE_NUMERIC_LOCAL();
+        }
 	while (buf[len-1] == '0' && len > 0) len--;
 	if ( buf[len-1] == '.' ) len--; /* eat the trailing decimal */
 	version = savepvn(buf, len);
@@ -610,7 +646,9 @@ VER_NV:
     }
 #endif
     else if ( SvPOK(ver))/* must be a string or something like a string */
+#if PERL_VERSION_LT(5,17,2)
 VER_PV:
+#endif
     {
 	STRLEN len;
 	version = savepvn(SvPV(ver,len), SvCUR(ver));
@@ -709,7 +747,7 @@ confused by derived classes which may contain additional hash entries):
 */
 
 SV *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_vverify2(pTHX_ SV *vs)
 #else
 Perl_vverify(pTHX_ SV *vs)
@@ -750,7 +788,7 @@ The SV returned has a refcount of 1.
 */
 
 SV *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_vnumify2(pTHX_ SV *vs)
 #else
 Perl_vnumify(pTHX_ SV *vs)
@@ -844,7 +882,7 @@ The SV returned has a refcount of 1.
 */
 
 SV *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_vnormal2(pTHX_ SV *vs)
 #else
 Perl_vnormal(pTHX_ SV *vs)
@@ -914,7 +952,7 @@ The SV returned has a refcount of 1.
 */
 
 SV *
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_vstringify2(pTHX_ SV *vs)
 #else
 Perl_vstringify(pTHX_ SV *vs)
@@ -955,7 +993,7 @@ converted into version objects.
 */
 
 int
-#if VUTIL_REPLACE_CORE
+#ifdef VUTIL_REPLACE_CORE
 Perl_vcmp2(pTHX_ SV *lhv, SV *rhv)
 #else
 Perl_vcmp(pTHX_ SV *lhv, SV *rhv)
@@ -12,7 +12,7 @@
 /* proto member is unused in version, it is used in CORE by non version xsubs */
 #  define VXSXSDP(x)
 #endif
-#define VXS(name) XS(VXSp(name))
+#define VXS(name) XS(VXSp(name)); XS(VXSp(name))
 
 /* uses PUSHs, so SP must be at start, PUSHs sv on Perl stack, then returns from
    xsub; this is a little more machine code/tailcall friendly than mPUSHs(foo);