[Perl/perl5] 64f996: perlvar: remove bareword filehandles from examples

[email protected] (Lukas Mai via perl5-changes)
Newsgroups perl.perl5.changes
Message-ID <Perl/perl5/push/refs/heads/blead/[email protected]>
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 64f9967086b2d9b5aa8a1629a4f8631b34c60ae3
      https://github.com/Perl/perl5/commit/64f9967086b2d9b5aa8a1629a4f8631b34c60ae3
  Author: Lukas Mai <[email protected]>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M pod/perlvar.pod

  Log Message:
  -----------
  perlvar: remove bareword filehandles from examples


  Commit: 0d054b5fc09e0782e59c79ae66f4c095fe9482fb
      https://github.com/Perl/perl5/commit/0d054b5fc09e0782e59c79ae66f4c095fe9482fb
  Author: Lukas Mai <[email protected]>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M pod/perlvar.pod

  Log Message:
  -----------
  perlvar: reduce scope of "no strict 'refs'"

Only the $$_ part needs strict refs to be disabled. Also, get the last
index of @- directly via `$#-` instead of `scalar(@-) - 1`.

The whole subroutine could be reduced to

    sub get_captures {
        return map { no strict 'refs'; $$_ } 1 .. $#-;
    }

But maybe that's too terse.


  Commit: d3b84304d04fc657694418229c655aa908618325
      https://github.com/Perl/perl5/commit/d3b84304d04fc657694418229c655aa908618325
  Author: Lukas Mai <[email protected]>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M pod/perlvar.pod

  Log Message:
  -----------
  perlvar: make $+ example less terse


  Commit: b80054aecf2e27acc96fdf96dae140cf851ab33c
      https://github.com/Perl/perl5/commit/b80054aecf2e27acc96fdf96dae140cf851ab33c
  Author: Lukas Mai <[email protected]>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M pod/perlvar.pod

  Log Message:
  -----------
  perlvar: include $! in open/close die messages


  Commit: 7680fea45f80c23d6dd742db6ff5beaa6bc700ed
      https://github.com/Perl/perl5/commit/7680fea45f80c23d6dd742db6ff5beaa6bc700ed
  Author: Lukas Mai <[email protected]>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M pod/perlvar.pod

  Log Message:
  -----------
  perlvar: be more generous with spaces & semicolons

Example code doesn't need to be super terse.


Compare: https://github.com/Perl/perl5/compare/8ea03480e109...7680fea45f80

To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.