Skip to content

Conversation

@JRaspass
Copy link
Contributor

charnames is the public pragma and gets the following changes:

  • Move the version declaration into the package line.
  • Use v5.40 to get strict, warnings, sub sigs, and module_true.
  • Use unicore::Name isn't needed, and is removed. It predates the charnames/_charnames split and _charnames loads it itself.
  • sub sigs replace manual arg validation in a couple of places.
  • import() and viacode() are created without needless wrappers.

_charnames is the internal module which shouldn't have outside callers so we're free to make more backwards-incompatible changes:

  • Move the version declaration into the package line.
  • Use v5.40 to get strict, warnings, sub sigs, and module_true.
  • sub sigs replace manual arg validation in a couple of places.
  • Various subs have been made lexical if they have no outside callers.
  • alias() is now consistently called with a hash.
  • Prototypes were replaced with sub sigs in a couple of subs. No caller calls without parens which might benefit from a prototype.
  • alias_file() had an unused arg which was removed.
  • A c-style for loop became simpler by switching to a foreach.
  • viacode()'s use of caller was adjusted by one stack frame as it's only ever called as charnames::viacode() which no longer wraps.

  • This set of changes does not require a perldelta entry.

charnames is the public pragma and gets the following changes:

 - Move the version declaration into the package line.
 - Use v5.40 to get strict, warnings, sub sigs, and module_true.
 - Use unicore::Name isn't needed, and is removed. It predates the
   charnames/_charnames split and _charnames loads it itself.
 - sub sigs replace manual arg validation in a couple of places.
 - import() and viacode() are created without needless wrappers.

_charnames is the internal module which shouldn't have outside callers so
we're free to make more backwards-incompatible changes:

 - Move the version declaration into the package line.
 - Use v5.40 to get strict, warnings, sub sigs, and module_true.
 - sub sigs replace manual arg validation in a couple of places.
 - Various subs have been made lexical if they have no outside callers.
 - alias() is now consistently called with a hash.
 - Prototypes were replaced with sub sigs in a couple of subs. No caller
   calls without parens which might benefit from a prototype.
 - alias_file() had an unused arg which was removed.
 - A c-style for loop became simpler by switching to a foreach.
 - viacode()'s use of caller was adjusted by one stack frame as it's
   only ever called as charnames::viacode() which no longer wraps.
@khwilliamson khwilliamson merged commit c470480 into Perl:blead Nov 20, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants