Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: c470480ad4b22a29dbc8dea2e24c7717a8ec2f9d
https://github.com/Perl/perl5/commit/c470480ad4b22a29dbc8dea2e24c7717a8ec2f9d
Author: James Raspass <[email protected]>
Date: 2025-11-19 (Wed, 19 Nov 2025)
Changed paths:
M lib/_charnames.pm
M lib/charnames.pm
Log Message:
-----------
Modernise charnames (and _charnames)
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.
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications