home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / lib / bytes.pm < prev    next >
Text File  |  2000-03-09  |  1KB  |  53 lines

  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
  53.