develooper Front page | perl.perl5.changes | Postings from January 2022

[Perl/perl5] 6cce1e: mktables: Add variable for clarity

From:
Karl Williamson via perl5-changes
Date:
January 5, 2022 17:19
Subject:
[Perl/perl5] 6cce1e: mktables: Add variable for clarity
Message ID:
Perl/perl5/push/refs/heads/blead/ab296d-f0ff81@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 6cce1edbb58ce03af59eacaf50850d665488091c
      https://github.com/Perl/perl5/commit/6cce1edbb58ce03af59eacaf50850d665488091c
  Author: Karl Williamson <khw@cpan.org>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M lib/unicore/mktables

  Log Message:
  -----------
  mktables: Add variable for clarity

This uses a new variable whose name reflects its usage, making the code
easier to understand.


  Commit: f0ff81efc195f719dd9527c95caca27e0bc727ed
      https://github.com/Perl/perl5/commit/f0ff81efc195f719dd9527c95caca27e0bc727ed
  Author: Karl Williamson <khw@cpan.org>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M charclass_invlists.h
    M lib/unicore/mktables
    M lib/unicore/uni_keywords.pl
    M regcharclass.h
    M uni_keywords.h

  Log Message:
  -----------
  Add missing aliases for \p{Present_In}

\p{Present_In} is a Perl extension of the Unicode Age property, added
because knowing the exact Unicode version in which a code point became
assigned is rarely what you want; much more frequently you want to know
if the code point exists in the version or not.  (Since this extension
was added, Unicode changed their language to declare that the Age
property should be interpreted in pattern matching, not as described,
but as Perl's Present_In is.  But  I chose to not change Age, to avoid
backwards compatibility issues, and this way, a coder can choose which
thing s/he wanted.)

Unicode typically has synonyms (aliases) for each value a property can
tak on, so \p{Age=6.1} and \p{Age=V61_1} mean the same thing.

Prior to this commit, neither \p{Present_In=1_1} nor \p{Present_In=NA}
worked.


Compare: https://github.com/Perl/perl5/compare/ab296d81b506...f0ff81efc195



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About