diff options
author | Zefram <zefram@fysh.org> | 2010-04-19 20:37:25 +0100 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2010-05-20 18:56:11 -0400 |
commit | 4e4da3acc11d96d134ed1dc0effd641e7bedb0ca (patch) | |
tree | ce3ff5f214a7e854b3065056f8cb48208ba47e30 /util.c | |
parent | 39f3f7f442aed93239540238d19a15f6020da747 (diff) | |
download | perl-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)"); } |