Fix SvGROW on an SV with SvLEN == 0 - copy in any existing data.
[p5sagit/p5-mst-13.2.git] / ext / Encode / lib / Encode / Encoding.pm
CommitLineData
18586f54 1package Encode::Encoding;
2# Base class for classes which implement encodings
3use strict;
4our $VERSION =
5 do {my @r=(q$Revision: 0.30 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r};
6
7sub 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
16sub name { shift->{'Name'} }
17
18# Temporary legacy methods
19sub toUnicode { shift->decode(@_) }
20sub fromUnicode { shift->encode(@_) }
21
22sub new_sequence { return $_[0] }
23
241;
25__END__