Commit | Line | Data |
5bc28da9 |
1 | package byte; |
2 | |
3 | sub import { |
4 | $^H |= 0x00000010; |
5 | } |
6 | |
7 | sub unimport { |
8 | $^H &= ~0x00000010; |
9 | } |
10 | |
11 | sub AUTOLOAD { |
12 | require "byte_heavy.pl"; |
13 | goto &$AUTOLOAD; |
14 | } |
15 | |
16 | sub length ($); |
17 | |
18 | 1; |
19 | __END__ |
20 | |
21 | =head1 NAME |
22 | |
393fec97 |
23 | byte - Perl pragma to force byte semantics rather than character semantics |
5bc28da9 |
24 | |
25 | =head1 SYNOPSIS |
26 | |
27 | use byte; |
28 | no byte; |
29 | |
30 | =head1 DESCRIPTION |
31 | |
393fec97 |
32 | WARNING: The implementation of Unicode support in Perl is incomplete. |
33 | Expect sudden and unannounced changes! |
34 | |
35 | The C<use byte> pragma disables character semantics for the rest of the |
36 | lexical scope in which it appears. C<no byte> can be used to reverse |
37 | the effect of C<use byte> within the current lexical scope. |
38 | |
39 | Perl normally assumes character semantics in the presence of |
40 | character data (i.e. data that has come from a source that has |
41 | been marked as being of a particular character encoding) or when |
42 | the global $^U flag is enabled. [XXX: implement -C command line |
43 | switch and mention that instead of $^U?] |
44 | |
45 | To understand the implications and differences between character |
46 | semantics and byte semantics, see L<perlunicode>. |
47 | |
48 | =head1 SEE ALSO |
49 | |
50 | L<perlunicode>, L<utf8> |
5bc28da9 |
51 | |
52 | =cut |