In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d1f1d9a74b9a375a1a92c95feae48ee46f9e3858?hp=a099aed4f4cbb1c9ea2766707caa76d250e3b25a>
- Log ----------------------------------------------------------------- commit d1f1d9a74b9a375a1a92c95feae48ee46f9e3858 Author: Father Chrysostomos <[email protected]> Date: Tue Apr 17 17:16:12 2012 -0700 Fix version tests on windoze This is a follow-up to commit 78e230aef16b. When there is an integer overflow (which itself produces a warning), the resulting behaviour with version objects is basically undefined. Hence, this newly-added test, which was actually just there to make sure there was no panic, failed. M lib/version/t/coretests.pm commit d29d0fd4f08c55e04a9f14af36cd918efe3c8e87 Author: Father Chrysostomos <[email protected]> Date: Tue Apr 17 17:14:14 2012 -0700 Donât produce uninit warning for ->VERSION(9e99) This is a follow-up to commit 78e230aef16b. It was using a temporary undef scalar and concatenating to it instead of setting it, triggering the warning. I havenât added tests, out of paranoia. M util.c ----------------------------------------------------------------------- Summary of changes: lib/version/t/coretests.pm | 3 +-- util.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/version/t/coretests.pm b/lib/version/t/coretests.pm index bd098b2..3f785e4 100644 --- a/lib/version/t/coretests.pm +++ b/lib/version/t/coretests.pm @@ -591,8 +591,7 @@ SKIP: { or diag $@; $_112478::VERSION = 1; eval { _112478->VERSION(9e99) }; - like $@, qr/this is only/, - '->VERSION(9e99) fails with the right error'; + unlike $@, qr/panic/, '->VERSION(9e99) does not panic'; } } diff --git a/util.c b/util.c index c7ddd73..d147e9e 100644 --- a/util.c +++ b/util.c @@ -4966,7 +4966,7 @@ Perl_upg_version(pTHX_ SV *ver, bool qv) setlocale(LC_NUMERIC, "C"); #endif if (sv) { - Perl_sv_catpvf(aTHX_ sv, "%.9"NVff, SvNVX(ver)); + Perl_sv_setpvf(aTHX_ sv, "%.9"NVff, SvNVX(ver)); buf = SvPV(sv, len); } else { -- Perl5 Master Repository
