* Father Chrysostomos via RT <perlbug-followup@perl.org> [2012-05-14 02:50]:
> I would suggest a clarification to the documentation:
>
> -In fact, an identifier within such curlies is forced to be a string,
> +In fact, a single identifier within such curlies is forced to be a string,
> as is any simple identifier within a hash subscript. Neither need
The surrounding text consistently uses “simple identifier” to refer to
this case, such as right on the next line. In fact the mention on the
next line arguably addresses the specific case that Linda W was confused
about, so it is can be argued that the behaviour and its documentation
are both correct and consistent with each other already i.e. nothing
needs to be done at all…
But if something were to be, I would suggest some additional editing to
reduce verbosity:
diff --git i/pod/perldata.pod w/pod/perldata.pod
index 876382d..eafdc84 100644
--- i/pod/perldata.pod
+++ w/pod/perldata.pod
@@ -355,8 +355,8 @@ C<$who::0>, and a C<$who's> variable. The last two would be the
$0 and the $s variables in the (presumably) non-existent package
C<who>.
-In fact, an identifier within such curlies is forced to be a string,
-as is any simple identifier within a hash subscript. Neither need
+In fact, a simple identifier within such curlies is forced to be
+a string, and likewise within a hash subscript. Neither need
quoting. Our earlier example, C<$days{'Feb'}> can be written as
C<$days{Feb}> and the quotes will be assumed automatically. But
anything more complicated in the subscript will be interpreted as an
Thread Previous
|
Thread Next