diff options
author | John Peacock <jpeacock@rowman.com> | 2006-06-08 17:14:04 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-06-09 16:03:03 +0000 |
commit | 92dcf8ce268fff64097044a269995ffa27692a3d (patch) | |
tree | 7366c02363dc12211bd8168cf4f6a60680d4b1a1 /util.c | |
parent | 7e265ef3a760ea72c6406128afc4b4771e71c25e (diff) | |
download | perl-92dcf8ce268fff64097044a269995ffa27692a3d.tar.gz |
[patch] Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.64.tar.gz
Message-ID: <4488CB5C.4070702@rowman.com>
p4raw-id: //depot/perl@28375
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -4192,6 +4192,11 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv) if ( av_len(av) == -1 ) /* oops, someone forgot to pass a value */ av_push(av, newSViv(0)); + /* fix RT#19517 - special case 'undef' as string */ + if ( *s == 'u' && strEQ(s,"undef") ) { + s += 5; + } + /* And finally, store the AV in the hash */ hv_store((HV *)hv, "version", 7, newRV_noinc((SV *)av), 0); return s; @@ -4311,12 +4316,13 @@ Perl_upg_version(pTHX_ SV *ver) { version = savepv(SvPV_nolen(ver)); } + s = scan_version(version, ver, qv); if ( *s != '\0' ) - if(ckWARN(WARN_MISC)) + if(ckWARN(WARN_MISC)) Perl_warner(aTHX_ packWARN(WARN_MISC), - "Version string '%s' contains invalid data; " - "ignoring: '%s'", version, s); + "Version string '%s' contains invalid data; " + "ignoring: '%s'", version, s); Safefree(version); return ver; } |