summaryrefslogtreecommitdiff
path: root/lib/bytes.pm
blob: 0424e1778da9bd374f8bfa9602238e00957742a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package byte;

sub import {
    $^H |= 0x00000008;
}

sub unimport {
    $^H &= ~0x00000008;
}

sub AUTOLOAD {
    require "byte_heavy.pl";
    goto &$AUTOLOAD;
}

sub length ($);

1;
__END__

=head1 NAME

byte - Perl pragma to force byte semantics rather than character semantics

=head1 SYNOPSIS

    use byte;
    no byte;

=head1 DESCRIPTION

WARNING: The implementation of Unicode support in Perl is incomplete.
Expect sudden and unannounced changes!

The C<use byte> pragma disables character semantics for the rest of the
lexical scope in which it appears.  C<no byte> can be used to reverse
the effect of C<use byte> within the current lexical scope.

Perl normally assumes character semantics in the presence of
character data (i.e. data that has come from a source that has
been marked as being of a particular character encoding).

To understand the implications and differences between character
semantics and byte semantics, see L<perlunicode>.

=head1 SEE ALSO

L<perlunicode>, L<utf8>

=cut