This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Create single fcn for dup'd /lib code
authorKarl Williamson <khw@cpan.org>
Sun, 15 Mar 2015 03:50:27 +0000 (21:50 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 19 Mar 2015 16:20:39 +0000 (10:20 -0600)
commit4b6af431de82c30fc8df0d5d024cf77f6512e8b9
treebcda9fc9b5f1bafebd609e5a6ee5cfb0866cf938
parent8b371338c1359c38e4de8ec65a0b9b884f05e450
Create single fcn for dup'd /lib code

Several /lib .pm's have the same code which is complicated enough to
warrant being placed in a shared function.  This commit creates a .pm
to be used by these .pm's.

This implements the perhaps archaic 'Meta' notation wherein characters
above 0x7f are displayed as M- plus the ASCII-range character derived by
looking at only the lower 7 bits of the upper range one.  There are
problems with this, in that a literal control character can be in the
string, whereas it is trying to get rid of control characters.  But I
left it to work as-is, just centralizing the code.

On EBCDIC platforms this notation makes no sense because the bit
patterns are all mixed up about having the upper bit set.  So this
commit fixes things on these platforms, so these are changed to
\x{...}.  No literal control characters are emitted.

Another potential problem is that characters above 0xFF are passed
through, unchanged.  But again, I let the existing behavior stand.
MANIFEST
Porting/Maintainers.pl
lib/DB.pm
lib/meta_notation.pm [new file with mode: 0644]
lib/meta_notation.t [new file with mode: 0644]
lib/perl5db.pl
lib/sigtrap.pm