[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/usr/src/Encode-compat-0.05/lib/Encode/ -> compat.pm (source)

   1  # $File: //member/autrijus/Encode-compat/lib/Encode/compat.pm $ $Author: autrijus $
   2  # $Revision: #5 $ $Change: 2534 $ $DateTime: 2002/12/02 00:33:16 $
   3  
   4  package Encode::compat;
   5  $Encode::compat::VERSION = '0.05';
   6  
   7  use strict;
   8  
   9  if ($] >= 5.007001 or $INC{'Encode.pm'}) {
  10      # nothing happens -- Encode.pm already available.
  11  }
  12  elsif ($] == 5.006001) {
  13      require Encode::compat::Alias;
  14      $INC{'Encode/Alias.pm'} = $INC{'Encode/compat/Alias.pm'};
  15  
  16      require Encode::compat::common;
  17      require Encode::compat::5006001;
  18      $INC{'Encode.pm'} = __FILE__;
  19  }
  20  else {
  21      die "Encode.pm compatibility layer for $] not yet available.";
  22  }
  23  
  24  1;
  25  
  26  __END__
  27  
  28  =head1 NAME
  29  
  30  Encode::compat - Encode.pm emulation layer
  31  
  32  =head1 VERSION
  33  
  34  This document describes version 0.04 of Encode::compat.
  35  
  36  =head1 SYNOPSIS
  37  
  38      use Encode::compat; # a no-op for Perl v5.7.1+
  39      use Encode qw(...); # all constants and imports works transparently
  40  
  41      # use Encode functions as normal
  42  
  43  =head1 DESCRIPTION
  44  
  45  WARNING: THIS IS A PROOF-OF-CONCEPT.  Most functions are incomplete.
  46  All implementation details are subject to change!
  47  
  48  This module provide a compatibility layer for B<Encode.pm> users on perl
  49  versions earlier than v5.7.1.  It translates whatever call it receives
  50  into B<Text::Iconv>, or (in the future) B<Unicode::MapUTF8> to perform
  51  the actual work.
  52  
  53  The C<is_utf8()>, C<_utf8_on()> and C<_utf8_off()> calls are performed
  54  by the method native to the perl version -- 5.6.1 would use
  55  C<pack>/C<unpack>, 5.6.0 uses C<tr//CU>, etc.
  56  
  57  Theoretically, it could be backported to 5.005 and earlier, with none of
  58  the unicode-related semantics available, and serves only as a
  59  abstraction layer above C<Text::Iconv>, C<Unicode::MapUTF8> and possibly
  60  other transcoding modules.
  61  
  62  =head1 CAVEATS
  63  
  64  Currently, this module only support 5.6.1, and merely provides the three
  65  utility function above (C<encode()>, C<decode()> and C<from_to()>), with
  66  a very kludgy C<FB_HTMLCREF> fallback against C<latin-1> in
  67  C<from_to()>.
  68  
  69  =head1 SEE ALSO
  70  
  71  L<Encode>, L<perlunicode>
  72  
  73  =head1 AUTHORS
  74  
  75  Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>
  76  
  77  =head1 COPYRIGHT
  78  
  79  Copyright 2002 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.
  80  
  81  This program is free software; you can redistribute it and/or 
  82  modify it under the same terms as Perl itself.
  83  
  84  See L<http://www.perl.com/perl/misc/Artistic.html>
  85  
  86  =cut


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1