summaryrefslogtreecommitdiff
path: root/lib/bytes.pm
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-19 06:33:49 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-19 06:33:49 +0000
commit8058d7abf600e878367b422ec507695e4ac6f25a (patch)
tree532a05dfd24d4fd343743294e4c48d2112ceba1f /lib/bytes.pm
parent66558a1012141f943df65dc612575097c38aed90 (diff)
downloadperl-8058d7abf600e878367b422ec507695e4ac6f25a.tar.gz
rename byte:: to bytes::
p4raw-id: //depot/perl@5133
Diffstat (limited to 'lib/bytes.pm')
-rw-r--r--lib/bytes.pm50
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/bytes.pm b/lib/bytes.pm
new file mode 100644
index 0000000000..0424e1778d
--- /dev/null
+++ b/lib/bytes.pm
@@ -0,0 +1,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