Branch: refs/heads/yves/document_demarcated_variable_form_better
  Home:   https://github.com/Perl/perl5
  Commit: 7164ed8527b9dcef3083c9226de0d95b7cfb843a
      
https://github.com/Perl/perl5/commit/7164ed8527b9dcef3083c9226de0d95b7cfb843a
  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: 25c571a09fe75a1d0227afae562b8f855147f698
      
https://github.com/Perl/perl5/commit/25c571a09fe75a1d0227afae562b8f855147f698
  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: 6256209da8b2dde870d831a6dbc9ba1d99d670ee
      
https://github.com/Perl/perl5/commit/6256209da8b2dde870d831a6dbc9ba1d99d670ee
  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/2b1686fe702d...6256209da8b2

Reply via email to