This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
don't bother testing if we can flush all handles when fflush(stdin)
[perl5.git] / lib / bytes.pm
1 package bytes;
2
3 $bytes::hint_bits = 0x00000008;
4
5 sub import {
6     $^H |= $bytes::hint_bits;
7 }
8
9 sub unimport {
10     $^H &= ~$bytes::hint_bits;
11 }
12
13 sub AUTOLOAD {
14     require "bytes_heavy.pl";
15     goto &$AUTOLOAD;
16 }
17
18 sub length ($);
19
20 1;
21 __END__
22
23 =head1 NAME
24
25 bytes - Perl pragma to force byte semantics rather than character semantics
26
27 =head1 SYNOPSIS
28
29     use bytes;
30     no bytes;
31
32 =head1 DESCRIPTION
33
34 WARNING: The implementation of Unicode support in Perl is incomplete.
35 See L<perlunicode> for the exact details.
36
37 The C<use bytes> pragma disables character semantics for the rest of the
38 lexical scope in which it appears.  C<no bytes> can be used to reverse
39 the effect of C<use bytes> within the current lexical scope.
40
41 Perl normally assumes character semantics in the presence of
42 character data (i.e. data that has come from a source that has
43 been marked as being of a particular character encoding).
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>
51
52 =cut