Integrate mainline
[p5sagit/p5-mst-13.2.git] / ext / Encode / lib / Encode / Encoding.pm
1 package Encode::Encoding;
2 # Base class for classes which implement encodings
3 use strict;
4 our $VERSION = 
5     do {my @r=(q$Revision: 0.30 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r};
6
7 sub Define
8 {
9     my $obj = shift;
10     my $canonical = shift;
11     $obj = bless { Name => $canonical },$obj unless ref $obj;
12     # warn "$canonical => $obj\n";
13   Encode::define_encoding($obj, $canonical, @_);
14 }
15
16 sub name { shift->{'Name'} }
17
18 # Temporary legacy methods
19 sub toUnicode    { shift->decode(@_) }
20 sub fromUnicode  { shift->encode(@_) }
21
22 sub new_sequence { return $_[0] }
23
24 1;
25 __END__