Commit | Line | Data |
657b208b |
1 | package bytes; |
5bc28da9 |
2 | |
3 | sub import { |
e194c14e |
4 | $^H |= 0x00000008; |
5bc28da9 |
5 | } |
6 | |
7 | sub unimport { |
e194c14e |
8 | $^H &= ~0x00000008; |
5bc28da9 |
9 | } |
10 | |
11 | sub AUTOLOAD { |
657b208b |
12 | require "bytes_heavy.pl"; |
5bc28da9 |
13 | goto &$AUTOLOAD; |
14 | } |
15 | |
16 | sub length ($); |
17 | |
18 | 1; |
19 | __END__ |
20 | |
21 | =head1 NAME |
22 | |
657b208b |
23 | bytes - Perl pragma to force byte semantics rather than character semantics |
5bc28da9 |
24 | |
25 | =head1 SYNOPSIS |
26 | |
657b208b |
27 | use bytes; |
28 | no bytes; |
5bc28da9 |
29 | |
30 | =head1 DESCRIPTION |
31 | |
393fec97 |
32 | WARNING: The implementation of Unicode support in Perl is incomplete. |
33 | Expect sudden and unannounced changes! |
34 | |
657b208b |
35 | The C<use bytes> pragma disables character semantics for the rest of the |
36 | lexical scope in which it appears. C<no bytes> can be used to reverse |
37 | the effect of C<use bytes> within the current lexical scope. |
393fec97 |
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 |
3969a896 |
41 | been marked as being of a particular character encoding). |
393fec97 |
42 | |
43 | To understand the implications and differences between character |
44 | semantics and byte semantics, see L<perlunicode>. |
45 | |
46 | =head1 SEE ALSO |
47 | |
48 | L<perlunicode>, L<utf8> |
5bc28da9 |
49 | |
50 | =cut |