Subject: | Sync with blead |
The attached patch syncs 0.9907 with blead.
The difference in t/07locale.t never seems to have been a part of blead.
The change in vpp.pm is from 858cc5e3f0.
The change is vutil.c is from e2ca569edb.
Subject: | blead.patch |
diff -ruN version-0.9907.orig/t/07locale.t version-0.9907/t/07locale.t
--- version-0.9907.orig/t/07locale.t 2014-01-13 11:18:22.000000000 +0000
+++ version-0.9907/t/07locale.t 2014-01-28 13:48:54.786366600 +0000
@@ -31,7 +31,7 @@
# because have to
# evaluate in current
# scope
- use if $^O !~ /android/, 'locale';
+ use locale;
while (<DATA>) {
chomp;
diff -ruN version-0.9907.orig/vperl/vpp.pm version-0.9907/vperl/vpp.pm
--- version-0.9907.orig/vperl/vpp.pm 2014-01-15 01:04:38.000000000 +0000
+++ version-0.9907/vperl/vpp.pm 2014-01-28 13:51:06.026866600 +0000
@@ -653,19 +653,6 @@
return $self;
}
- if ($Config{d_setlocale}) {
- use POSIX qw/locale_h/;
- use if $Config{d_setlocale}, 'locale';
- my $currlocale = setlocale(LC_ALL);
-
- # if the current locale uses commas for decimal points, we
- # just replace commas with decimal places, rather than changing
- # locales
- if ( localeconv()->{decimal_point} eq ',' ) {
- $value =~ tr/,/./;
- }
- }
-
if ( not defined $value or $value =~ /^undef$/ ) {
# RT #19517 - special case for undef comparison
# or someone forgot to pass a value
@@ -686,6 +673,19 @@
$value = _un_vstring($value);
+ if ($Config{d_setlocale}) {
+ use POSIX qw/locale_h/;
+ use if $Config{d_setlocale}, 'locale';
+ my $currlocale = setlocale(LC_ALL);
+
+ # if the current locale uses commas for decimal points, we
+ # just replace commas with decimal places, rather than changing
+ # locales
+ if ( localeconv()->{decimal_point} eq ',' ) {
+ $value =~ tr/,/./;
+ }
+ }
+
# exponential notation
if ( $value =~ /\d+.?\d*e[-+]?\d+/ ) {
$value = sprintf("%.9f",$value);
diff -ruN version-0.9907.orig/vutil/vutil.c version-0.9907/vutil/vutil.c
--- version-0.9907.orig/vutil/vutil.c 2014-01-14 11:08:46.000000000 +0000
+++ version-0.9907/vutil/vutil.c 2014-01-28 13:52:38.699366600 +0000
@@ -553,6 +553,7 @@
const MAGIC *mg;
#endif
+ ENTER;
PERL_ARGS_ASSERT_UPG_VERSION;
if ( SvNOK(ver) && !( SvPOK(ver) && SvCUR(ver) == 3 ) )
@@ -655,6 +656,7 @@
Perl_ck_warner(aTHX_ packWARN(WARN_MISC),
"Version string '%s' contains invalid data; "
"ignoring: '%s'", version, s);
+ LEAVE;
return ver;
}