Branch: refs/heads/yves/document_demarcated_variable_form_better
Home: https://github.com/Perl/perl5
Commit: 17efe06dea518e9c7db72376c67959bb8d5db925
https://github.com/Perl/perl5/commit/17efe06dea518e9c7db72376c67959bb8d5db925
Author: Yves Orton <[email protected]>
Date: 2022-03-09 (Wed, 09 Mar 2022)
Changed paths:
M pod/perldata.pod
Log Message:
-----------
pod/perldata.pod - document demarcated var form (curly braces) better
Perl supports using curly braces for demarcated variable notation, both
in normal code but especially for interpolation. Some variables, such
as a multi-character caret variables must use this form at all times,
and must use this form to achieve interpolation of a variable subscript.
Prior to this patch we only documented the simple forms of this feature,
for example "${who}'s this then", but we did not document that it also
includes more complex variable access like array subscripts
"@{array[1,5]}" nor the cases where this form is outright required such
as when interpolating multi char caret variables like "${^CAPTURE[10]}".
This patch provides explanation for the full range of cases and also
documents how backslash can used as another form of disambiguation.
See GH Issue #19497 and GH Issue #18800 for examples of people being
confused by this notation.
Commit: 20111f859711c9471ceec19b67df2f4dbf9a3b5c
https://github.com/Perl/perl5/commit/20111f859711c9471ceec19b67df2f4dbf9a3b5c
Author: Yves Orton <[email protected]>
Date: 2022-03-09 (Wed, 09 Mar 2022)
Changed paths:
M pod/perlre.pod
Log Message:
-----------
pod/perlre.pod - document @{^CAPTURE} magic variable
This variable is documented in perlvar but we really should also mention
it in perlre since its reason for existence is to provide array access
to the capture variables in a pattern.
Commit: 2b1686fe702dcc6aff8658ff9bfafa8d1012d6fb
https://github.com/Perl/perl5/commit/2b1686fe702dcc6aff8658ff9bfafa8d1012d6fb
Author: Yves Orton <[email protected]>
Date: 2022-03-09 (Wed, 09 Mar 2022)
Changed paths:
M pod/perlvar.pod
Log Message:
-----------
perlvar.pod - add more info about demarcated variable form
Compare: https://github.com/Perl/perl5/compare/f064dea034d8...2b1686fe702d