diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-06-21 12:04:32 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-06-21 12:16:30 -0600 |
commit | 9c1129c7de15ff8044f606550980c47f8c1724e9 (patch) | |
tree | a70daf9fb0cd89ae0a7d3d75497e7baf4028a21b /pod/perldata.pod | |
parent | 1dbf759920c13f5e1ec5c87cb6e33d629e302e4b (diff) | |
download | perl-9c1129c7de15ff8044f606550980c47f8c1724e9.tar.gz |
PATCH [perl #118563]: Fix perldata ident defn
The formal definition of identifiers was missing the fact that every
character in an identifier must match \w. This also adds some
explanation.
Diffstat (limited to 'pod/perldata.pod')
-rw-r--r-- | pod/perldata.pod | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod index 8bf3dfdab3..e46507a759 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -120,7 +120,13 @@ restrictions. If working under the effect of the C<use utf8;> pragma, the following rules apply: - / (?[ ( \p{Word} & \p{XID_Start} ) + [_] ]) \p{XID_Continue}* /x + / (?[ ( \p{Word} & \p{XID_Start} ) + [_] ]) + (?[ ( \p{Word} & \p{XID_Continue} ) ]) * /x + +That is, a "start" character followed by any number of "continue" +characters. Perl requires every character in an identifier to also +match C<\w> (this prevents some problematic cases); and Perl +additionally accepts identfier names beginning with an underscore. If not under C<use utf8>, the source is treated as ASCII + 128 extra controls, and identifiers should match |