This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
charnames: check for use bytes in vianame; efficiency
authorKarl Williamson <khw@khw-desktop.(none)>
Sat, 3 Jul 2010 16:12:33 +0000 (10:12 -0600)
committerJesse Vincent <jesse@bestpractical.com>
Sun, 4 Jul 2010 20:43:44 +0000 (21:43 +0100)
commit5a7fb30a54f192f9dc958d7a74add600705b96bb
tree95745f9a17dae9afbea0305e9b6ad7097dcf8d6e
parentda9dec57e250ecec9d2000bc94f516e6b3ee468c
charnames: check for use bytes in vianame; efficiency

When vianame returns a chr, it now verifies that it is legal under 'use
bytes'.  Update .t

An instance of taking of a substr of a huge string is needed only in an
error leg.  Move it to that leg for performance.

And make the message a subroutine so will be identical whenever raised.
lib/charnames.pm
lib/charnames.t