diff options
author | John Peacock <jpeacock@messagesystems.com> | 2012-09-16 07:09:59 -0400 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2012-09-16 07:09:59 -0400 |
commit | a6075c7300c497a2e670c1d26bb60551c0075e32 (patch) | |
tree | b7ba87bd4ed671af6dff615229ef06a758f323aa /util.c | |
parent | 4db91b87664af670123581a2ec65e24b185ba6ed (diff) | |
download | perl-a6075c7300c497a2e670c1d26bb60551c0075e32.tar.gz |
Bring bleadperl up to parity with CPAN for version.pm
Please find attached a patch to bleadperl to bring up to date with the
CPAN release of version.pm. This release was to deal primarily with an
edge case in numifying alpha decimal versions:
https://rt.cpan.org/Ticket/Display.html?id=79259
I've also synchronized all of the other version.pm test cases, so that
the code in core is identical to the CPAN release.
Signed-off-by: David Golden <dagolden@cpan.org>
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4364,6 +4364,7 @@ dotted_decimal_version: } /* end if dotted-decimal */ else { /* decimal versions */ + int j = 0; /* may need this later */ /* special strict case for leading '.' or '0' */ if (strict) { if (*d == '.') { @@ -4426,7 +4427,7 @@ dotted_decimal_version: } while (isDIGIT(*d)) { - d++; + d++; j++; if (*d == '.' && isDIGIT(d[-1])) { if (alpha) { BADVERSION(s,errstr,"Invalid version format (underscores before decimal)"); @@ -4448,6 +4449,7 @@ dotted_decimal_version: if ( ! isDIGIT(d[1]) ) { BADVERSION(s,errstr,"Invalid version format (misplaced underscore)"); } + width = j; d++; alpha = TRUE; } |