summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-04-19 20:37:25 +0100
committerDavid Golden <dagolden@cpan.org>2010-05-20 18:56:11 -0400
commit4e4da3acc11d96d134ed1dc0effd641e7bedb0ca (patch)
treece3ff5f214a7e854b3065056f8cb48208ba47e30 /util.c
parent39f3f7f442aed93239540238d19a15f6020da747 (diff)
downloadperl-4e4da3acc11d96d134ed1dc0effd641e7bedb0ca.tar.gz
support "package Foo { ... }"
Package block syntax limits the scope of the package declaration to the attached block. It's cleaner than requiring the declaration to come inside the block.
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.c b/util.c
index f1d7d500eb..5e7a24ea41 100644
--- a/util.c
+++ b/util.c
@@ -4482,7 +4482,7 @@ dotted_decimal_version:
saw_decimal++;
d++;
}
- else if (!*d || *d == ';' || isSPACE(*d) || *d == '}') {
+ else if (!*d || *d == ';' || isSPACE(*d) || *d == '{' || *d == '}') {
if ( d == s ) {
/* found nothing */
BADVERSION(s,errstr,"Invalid version format (version required)");
@@ -4513,7 +4513,7 @@ dotted_decimal_version:
/* scan the fractional part after the decimal point*/
- if (!isDIGIT(*d) && (strict || ! (!*d || *d == ';' || isSPACE(*d) || *d == '}') )) {
+ if (!isDIGIT(*d) && (strict || ! (!*d || *d == ';' || isSPACE(*d) || *d == '{' || *d == '}') )) {
/* strict or lax-but-not-the-end */
BADVERSION(s,errstr,"Invalid version format (fractional part required)");
}
@@ -4551,7 +4551,7 @@ version_prescan_finish:
while (isSPACE(*d))
d++;
- if (!isDIGIT(*d) && (! (!*d || *d == ';' || *d == '}') )) {
+ if (!isDIGIT(*d) && (! (!*d || *d == ';' || *d == '{' || *d == '}') )) {
/* trailing non-numeric data */
BADVERSION(s,errstr,"Invalid version format (non-numeric data)");
}