summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib/bytes.pm
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-06-25 11:04:01 +0000
committermarkm <markm@FreeBSD.org>2000-06-25 11:04:01 +0000
commit2618fad5bbb2d0182eb31ed805c41b543c513940 (patch)
tree52ba93338b13aefd02a0055304a9eccfa0e049f5 /contrib/perl5/lib/bytes.pm
parent77644ee620b6a79cf8c538abaf7cd301a875528d (diff)
downloadFreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.zip
FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.tar.gz
Vendor import of Perl 5.006
Diffstat (limited to 'contrib/perl5/lib/bytes.pm')
-rw-r--r--contrib/perl5/lib/bytes.pm52
1 files changed, 52 insertions, 0 deletions
diff --git a/contrib/perl5/lib/bytes.pm b/contrib/perl5/lib/bytes.pm
new file mode 100644
index 0000000..f93d615
--- /dev/null
+++ b/contrib/perl5/lib/bytes.pm
@@ -0,0 +1,52 @@
+package bytes;
+
+$bytes::hint_bits = 0x00000008;
+
+sub import {
+ $^H |= $bytes::hint_bits;
+}
+
+sub unimport {
+ $^H &= ~$bytes::hint_bits;
+}
+
+sub AUTOLOAD {
+ require "bytes_heavy.pl";
+ goto &$AUTOLOAD;
+}
+
+sub length ($);
+
+1;
+__END__
+
+=head1 NAME
+
+bytes - Perl pragma to force byte semantics rather than character semantics
+
+=head1 SYNOPSIS
+
+ use bytes;
+ no bytes;
+
+=head1 DESCRIPTION
+
+WARNING: The implementation of Unicode support in Perl is incomplete.
+See L<perlunicode> for the exact details.
+
+The C<use bytes> pragma disables character semantics for the rest of the
+lexical scope in which it appears. C<no bytes> can be used to reverse
+the effect of C<use bytes> 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
OpenPOWER on IntegriCloud