diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-12-18 20:45:14 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-12-20 22:02:42 -0700 |
commit | fbb93542d6662666a88828fb4c15803f8ba377f0 (patch) | |
tree | 300d9b114ad07a3281c6575d2abb02b7645389b7 /pod/perlunicode.pod | |
parent | f8988b416c244747b17eb3004ac6f8bbcf366e7a (diff) | |
download | perl-fbb93542d6662666a88828fb4c15803f8ba377f0.tar.gz |
Autoload charnames for \N{name}
This autoloads charnames.pm when needed. It uses the :full and :short
options. :loose is not used because of its relative unfamiliarity in
the Perl community, and is slower. (If someone later added a typical
"use charnames qw(:full)", things that previously matched under :loose
would start to fail, causing confustion. If :loose does become more
common, we can change this in the future to use it; the converse isn't
true.)
The callable functions in the module are not automatically loaded. To
access them, an explicity "use charnames" must be provided.
Thanks to Tony Cook for doing a code inspection and finding a missing
SPAGAIN.
Diffstat (limited to 'pod/perlunicode.pod')
-rw-r--r-- | pod/perlunicode.pod | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index 2529c97523..d6dc222121 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -158,13 +158,14 @@ the additional problem that the value for such characters gives the EBCDIC character rather than the Unicode one, thus it is more portable to use C<\N{U+...}> instead. -Additionally, if you - - use charnames ':full'; - -you can use the C<\N{...}> notation and put the official Unicode -character name within the braces, such as C<\N{WHITE SMILING FACE}>. -See L<charnames>. +Additionally, you can use the C<\N{...}> notation and put the official +Unicode character name within the braces, such as +C<\N{WHITE SMILING FACE}>. This automatically loads the L<charnames> +module with the C<:full> and C<:short> options. If you prefer different +options for this module, you can instead, before the C<\N{...}>, +explicitly load it with your desired options; for example, + + use charnames ':loose'; =item * |