In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/d3a5b29c73b5a2fd6524ca1f8c5c779bd8cb0687?hp=1b30b4a8259a74c5ffaee362bc1d881c40fc5279>

- Log -----------------------------------------------------------------
commit d3a5b29c73b5a2fd6524ca1f8c5c779bd8cb0687
Author: John Peacock <jpeac...@cpan.org>
Date:   Thu Apr 12 11:22:58 2018 -0400

    Synch cpan/version/* and other files with CPAN version 0.9921.
    
    Committer's note:  In large part probably due to the CUSTOMIZED aspect of
    'version' in Porting/Maintainer.pl, the regular 'Porting/sync-with-cpan'
    program did not give good results when I attempted to use it for version.pm.
    So I hacked together my own program, available here:
    
    https://github.com/jkeenan/scripts-misc/blob/master/sync-version-pm.pl

-----------------------------------------------------------------------

Summary of changes:
 cpan/version/lib/version.pm       |  2 +-
 cpan/version/lib/version.pod      |  7 +++---
 cpan/version/lib/version/regex.pm |  2 +-
 cpan/version/t/01base.t           |  2 +-
 cpan/version/t/02derived.t        |  2 +-
 cpan/version/t/03require.t        |  2 +-
 cpan/version/t/05sigdie.t         |  2 +-
 cpan/version/t/06noop.t           |  2 +-
 cpan/version/t/07locale.t         |  2 +-
 cpan/version/t/08_corelist.t      |  2 +-
 cpan/version/t/09_list_util.t     |  2 +-
 t/porting/customized.dat          |  4 ++--
 vutil.c                           | 30 ++++++++++++-------------
 vutil.h                           | 47 ++++++++++++++++++++++-----------------
 vxs.inc                           |  2 +-
 15 files changed, 58 insertions(+), 52 deletions(-)

diff --git a/cpan/version/lib/version.pm b/cpan/version/lib/version.pm
index c85e8a029b..100bd03909 100644
--- a/cpan/version/lib/version.pm
+++ b/cpan/version/lib/version.pm
@@ -10,7 +10,7 @@ if ($] >= 5.015) {
 
 use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
 
-$VERSION = 0.9918;
+$VERSION = 0.9921;
 $CLASS = 'version';
 
 # avoid using Exporter
diff --git a/cpan/version/lib/version.pod b/cpan/version/lib/version.pod
index 42691b1e0c..9f3b27d0f4 100644
--- a/cpan/version/lib/version.pod
+++ b/cpan/version/lib/version.pod
@@ -266,10 +266,9 @@ leading-v and at least 3 components.
 
 =head2 numify()
 
-Returns a value representing the object in a pure decimal form without
-trailing zeroes.
+Returns a value representing the object in a pure decimal.
 
- version->declare('v1.2')->numify;  # 1.002
+ version->declare('v1.2')->numify;  # 1.002000
  version->parse('1.2')->numify;     # 1.200
 
 =head2 stringify()
@@ -280,7 +279,7 @@ way perl would normally represent it in a string.  This 
method is used whenever
 a version object is interpolated into a string.
 
  version->declare('v1.2')->stringify;    # v1.2
- version->parse('1.200')->stringify;     # 1.200
+ version->parse('1.200')->stringify;     # 1.2
  version->parse(1.02_30)->stringify;     # 1.023
 
 =head1 EXPORTED FUNCTIONS
diff --git a/cpan/version/lib/version/regex.pm 
b/cpan/version/lib/version/regex.pm
index 8d66e19c00..77d54512ed 100644
--- a/cpan/version/lib/version/regex.pm
+++ b/cpan/version/lib/version/regex.pm
@@ -8,7 +8,7 @@ use vars qw(
     $LAX_DECIMAL_VERSION $LAX_DOTTED_DECIMAL_VERSION
 );
 
-$VERSION = 0.9918;
+$VERSION = 0.9921;
 
 #--------------------------------------------------------------------------#
 # Version regexp components
diff --git a/cpan/version/t/01base.t b/cpan/version/t/01base.t
index df0f6f096e..608dc52f0b 100644
--- a/cpan/version/t/01base.t
+++ b/cpan/version/t/01base.t
@@ -14,7 +14,7 @@ BEGIN {
         )
     );
     require $coretests;
-    use_ok('version', 0.9918);
+    use_ok('version', 0.9921);
 }
 
 BaseTests("version","new","qv");
diff --git a/cpan/version/t/02derived.t b/cpan/version/t/02derived.t
index 3191c9ad1a..f3d3ffe173 100644
--- a/cpan/version/t/02derived.t
+++ b/cpan/version/t/02derived.t
@@ -15,7 +15,7 @@ BEGIN {
         )
     );
     require $coretests;
-    use_ok("version", 0.9918);
+    use_ok("version", 0.9921);
     # If we made it this far, we are ok.
 }
 
diff --git a/cpan/version/t/03require.t b/cpan/version/t/03require.t
index d4744867b4..4146d303c1 100644
--- a/cpan/version/t/03require.t
+++ b/cpan/version/t/03require.t
@@ -19,7 +19,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.9918, "Make sure we have the correct class";
+is $version::VERSION, 0.9921, "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()");
 
diff --git a/cpan/version/t/05sigdie.t b/cpan/version/t/05sigdie.t
index 3801a35ad6..c9eecae766 100644
--- a/cpan/version/t/05sigdie.t
+++ b/cpan/version/t/05sigdie.t
@@ -14,7 +14,7 @@ BEGIN {
 }
 
 BEGIN {
-    use version 0.9918;
+    use version 0.9921;
 }
 
 pass "Didn't get caught by the wrong DIE handler, which is a good thing";
diff --git a/cpan/version/t/06noop.t b/cpan/version/t/06noop.t
index 6c6de7f4f3..25f12c6010 100644
--- a/cpan/version/t/06noop.t
+++ b/cpan/version/t/06noop.t
@@ -7,7 +7,7 @@
 use Test::More qw/no_plan/;
 
 BEGIN {
-    use_ok('version', 0.9918);
+    use_ok('version', 0.9921);
 }
 
 my $v1 = version->new('1.2');
diff --git a/cpan/version/t/07locale.t b/cpan/version/t/07locale.t
index a197bdcf16..8ac74a6e4f 100644
--- a/cpan/version/t/07locale.t
+++ b/cpan/version/t/07locale.t
@@ -11,7 +11,7 @@ use Test::More tests => 8;
 use Config;
 
 BEGIN {
-    use_ok('version', 0.9918);
+    use_ok('version', 0.9921);
 }
 
 SKIP: {
diff --git a/cpan/version/t/08_corelist.t b/cpan/version/t/08_corelist.t
index 92a76bdf78..88a3724693 100644
--- a/cpan/version/t/08_corelist.t
+++ b/cpan/version/t/08_corelist.t
@@ -5,7 +5,7 @@
 #########################
 
 use Test::More tests => 3;
-use_ok("version", 0.9918);
+use_ok("version", 0.9921);
 
 # do strict lax tests in a sub to isolate a package to test importing
 SKIP: {
diff --git a/cpan/version/t/09_list_util.t b/cpan/version/t/09_list_util.t
index a263c2d47f..6a420665d6 100644
--- a/cpan/version/t/09_list_util.t
+++ b/cpan/version/t/09_list_util.t
@@ -4,7 +4,7 @@
 #########################
 
 use strict;
-use_ok("version", 0.9918);
+use_ok("version", 0.9921);
 use Test::More;
 
 BEGIN {
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index 5473fa7b62..06ecd96189 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -27,5 +27,5 @@ experimental cpan/experimental/t/basic.t 
a073ea03ccc98dec496569f3648ab01a5fe1c7a
 perlfaq cpan/perlfaq/lib/perlfaq5.pod bcc1b6af3b6dff3973643acf8d5e741463374123
 perlfaq cpan/perlfaq/lib/perlfaq8.pod bffbc0c8fa828aead24e0891a5e789369a8e0743
 podlators pod/perlpodstyle.pod c6500c9950b46e8228d4adbc09a3ee2ef23de2d0
-version cpan/version/lib/version.pm bee369df1bd84e09107a90d72ec12c38bcb97cce
-version vxs.inc 8498104713e5ce189602dda55dca38bee780c297
+version cpan/version/lib/version.pm 2325ac992f0be9d765b558a2162ca13a46de256f
+version vxs.inc f26c23f0279fb64c77ad814af906c04930cff81c
diff --git a/vutil.c b/vutil.c
index a66d6ef2f4..a3f11bee60 100644
--- a/vutil.c
+++ b/vutil.c
@@ -620,7 +620,7 @@ VER_NV:
 #endif
 #ifdef USE_LOCALE_NUMERIC
 
-        {
+       {
             /* This may or may not be called from code that has switched
              * locales without letting perl know, therefore we have to find it
              * from first principals.  See [perl #121930]. */
@@ -666,8 +666,8 @@ VER_NV:
                 else {  /* This value indicates to the restore code that we
                            didn't change the locale */
                     locale_name_on_entry = NULL;
-                }
-            }
+           }
+       }
             else if (locale_obj_on_entry == PL_underlying_numeric_obj) {
                 /* Here, the locale appears to have been changed to use the
                  * program's underlying locale.  Just use our mechanisms to
@@ -692,15 +692,15 @@ VER_NV:
 
 #endif
 
-            if (sv) {
-                Perl_sv_catpvf(aTHX_ sv, "%.9" NVff, SvNVX(ver));
-                len = SvCUR(sv);
-                buf = SvPVX(sv);
-            }
-            else {
-                len = my_snprintf(tbuf, sizeof(tbuf), "%.9" NVff, SvNVX(ver));
-                buf = tbuf;
-            }
+       if (sv) {
+           Perl_sv_catpvf(aTHX_ sv, "%.9"NVff, SvNVX(ver));
+           len = SvCUR(sv);
+           buf = SvPVX(sv);
+       }
+       else {
+           len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVff, SvNVX(ver));
+           buf = tbuf;
+       }
 
 #ifdef USE_LOCALE_NUMERIC
 
@@ -725,7 +725,7 @@ VER_NV:
             }
             else if (locale_obj_on_entry != PL_C_locale_obj) {
                 uselocale(locale_obj_on_entry);
-            }
+        }
 
 #  endif
 
@@ -989,11 +989,11 @@ Perl_vnormal(pTHX_ SV *vs)
        SV * tsv = *av_fetch(av, 0, 0);
        digit = SvIV(tsv);
     }
-    sv = Perl_newSVpvf(aTHX_ "v%" IVdf, (IV)digit);
+    sv = Perl_newSVpvf(aTHX_ "v%"IVdf, (IV)digit);
     for ( i = 1 ; i <= len ; i++ ) {
        SV * tsv = *av_fetch(av, i, 0);
        digit = SvIV(tsv);
-       Perl_sv_catpvf(aTHX_ sv, ".%" IVdf, (IV)digit);
+       Perl_sv_catpvf(aTHX_ sv, ".%"IVdf, (IV)digit);
     }
 
     if ( len <= 2 ) { /* short version, must be at least three */
diff --git a/vutil.h b/vutil.h
index 193c66d561..ffeb05cae3 100644
--- a/vutil.h
+++ b/vutil.h
@@ -226,33 +226,40 @@ const char * Perl_prescan_version(pTHX_ const char *s, 
bool strict, const char**
 #if PERL_VERSION_LT(5,27,9)
 #  define LC_NUMERIC_LOCK
 #  define LC_NUMERIC_UNLOCK
-#    if PERL_VERSION_LT(5,19,0)
-#   undef STORE_LC_NUMERIC_SET_STANDARD
-#   undef RESTORE_LC_NUMERIC
-#   undef DECLARATION_FOR_LC_NUMERIC_MANIPULATION
-#   ifdef USE_LOCALE
-#    define DECLARATION_FOR_LC_NUMERIC_MANIPULATION char *loc
-#    define STORE_NUMERIC_SET_STANDARD()\
-       loc = savepv(setlocale(LC_NUMERIC, NULL));  \
-       SAVEFREEPV(loc); \
-       setlocale(LC_NUMERIC, "C");
-
-#    define RESTORE_LC_NUMERIC()\
-       setlocale(LC_NUMERIC, loc);
-#   else
-#    define DECLARATION_FOR_LC_NUMERIC_MANIPULATION
-#    define STORE_LC_NUMERIC_SET_STANDARD()
-#    define RESTORE_LC_NUMERIC()
-#   endif
+#  if PERL_VERSION_LT(5,19,0)
+#    undef STORE_LC_NUMERIC_SET_STANDARD
+#    undef RESTORE_LC_NUMERIC
+#    undef DECLARATION_FOR_LC_NUMERIC_MANIPULATION
+#    ifdef USE_LOCALE
+#      define DECLARATION_FOR_LC_NUMERIC_MANIPULATION char *loc
+#      define STORE_NUMERIC_SET_STANDARD()\
+        loc = savepv(setlocale(LC_NUMERIC, NULL));  \
+        SAVEFREEPV(loc); \
+        setlocale(LC_NUMERIC, "C");
+#      define RESTORE_LC_NUMERIC()\
+        setlocale(LC_NUMERIC, loc);
+#    else
+#      define DECLARATION_FOR_LC_NUMERIC_MANIPULATION
+#      define STORE_LC_NUMERIC_SET_STANDARD()
+#      define RESTORE_LC_NUMERIC()
+#    endif
 #  endif
 #endif
 
 #ifndef LOCK_NUMERIC_STANDARD
-#define LOCK_NUMERIC_STANDARD()
+#  define LOCK_NUMERIC_STANDARD()
 #endif
 
 #ifndef UNLOCK_NUMERIC_STANDARD
-#define UNLOCK_NUMERIC_STANDARD()
+#  define UNLOCK_NUMERIC_STANDARD()
+#endif
+
+/* The names of these changed in 5.28 */
+#ifndef LOCK_LC_NUMERIC_STANDARD
+#  define LOCK_LC_NUMERIC_STANDARD() LOCK_NUMERIC_STANDARD()
+#endif
+#ifndef UNLOCK_LC_NUMERIC_STANDARD
+#  define UNLOCK_LC_NUMERIC_STANDARD() UNLOCK_NUMERIC_STANDARD()
 #endif
 
 /* ex: set ro: */
diff --git a/vxs.inc b/vxs.inc
index 0e5e72a90b..b5c00d7de1 100644
--- a/vxs.inc
+++ b/vxs.inc
@@ -138,7 +138,7 @@ VXS(universal_version)
                            name, SvPVx_nolen_const(req));
 #else
                Perl_croak(aTHX_
-                          "%" HEKf " does not define $%"HEKf
+                          "%" HEKf " does not define $%" HEKf
                           "::VERSION--version check failed",
                           HEKfARG(name), HEKfARG(name));
 #endif

-- 
Perl5 Master Repository

Reply via email to