summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@havurah-software.org>2009-06-28 18:56:07 -0400
committerCraig A. Berry <craigberry@mac.com>2009-06-28 18:53:34 -0500
commitf941e6586d4c29e3329b7b366a6684d78e3a5735 (patch)
treeee20195a0e99eaa34e731d6d84760694d04f81d5 /util.c
parent0ee0837e8d54264dbb29748bad993d0f255f67f4 (diff)
downloadperl-f941e6586d4c29e3329b7b366a6684d78e3a5735.tar.gz
Integrate version.pm-0.77 into bleadperl
Diffstat (limited to 'util.c')
-rw-r--r--util.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/util.c b/util.c
index d8d28647f2..0d524e9e8f 100644
--- a/util.c
+++ b/util.c
@@ -4229,7 +4229,7 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
pos = s;
/* pre-scan the input string to check for decimals/underbars */
- while ( *pos == '.' || *pos == '_' || isDIGIT(*pos) )
+ while ( *pos == '.' || *pos == '_' || *pos == ',' || isDIGIT(*pos) )
{
if ( *pos == '.' )
{
@@ -4245,6 +4245,12 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
alpha = 1;
width = pos - last - 1; /* natural width of sub-version */
}
+ else if ( *pos == ',' && isDIGIT(pos[1]) )
+ {
+ saw_period++ ;
+ last = pos;
+ }
+
pos++;
}
@@ -4332,6 +4338,8 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
s = ++pos;
else if ( *pos == '_' && isDIGIT(pos[1]) )
s = ++pos;
+ else if ( *pos == ',' && isDIGIT(pos[1]) )
+ s = ++pos;
else if ( isDIGIT(*pos) )
s = pos;
else {