From: Steve Peters Date: Wed, 11 Jan 2006 11:53:07 +0000 (+0000) Subject: Fix the new warning created with version-0.53 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=808ee47ef2a751e743c48b9742ba8610cfe8a497;p=p5sagit%2Fp5-mst-13.2.git Fix the new warning created with version-0.53 p4raw-id: //depot/perl@26780 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 561d243..3093e09 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -4711,6 +4711,11 @@ are automatically rebound to the current values of such variables. its equivalent C block found an internal inconsistency with the version number. +=item Version string '%s' contains invalid data; ignoring: '%s' + +(W misc) The version string contains invalid characters, so it is +being ignored. + =item v-string in use/require is non-portable (W portable) The use of v-strings is non-portable to older, pre-5.6, Perls. diff --git a/util.c b/util.c index 59c287f..2859a47 100644 --- a/util.c +++ b/util.c @@ -4246,9 +4246,11 @@ Perl_upg_version(pTHX_ SV *ver) version = savepv(SvPV_nolen(ver)); } s = scan_version(version, ver, qv); - if ( *s != '\0' ) - Perl_warn(aTHX_ "Version string '%s' contains invalid data; " - "ignoring: '%s'", version, s); + if ( *s != '\0' ) + if(ckWARN(WARN_MISC)) + Perl_warner(aTHX_ packWARN(WARN_MISC), + "Version string '%s' contains invalid data; " + "ignoring: '%s'", version, s); Safefree(version); return ver; }