Commit | Line | Data |
df1df145 |
1 | package Encode::Internal; |
2 | use strict; |
48e3bbdd |
3 | our $VERSION = do { my @r = (q$Revision: 1.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; |
ee981de6 |
4 | |
df1df145 |
5 | use base 'Encode::Encoding'; |
6 | |
7 | # Dummy package that provides the encode interface but leaves data |
8 | # as UTF-X encoded. It is here so that from_to() works. |
9 | |
10 | __PACKAGE__->Define('Internal'); |
11 | |
5129552c |
12 | if (ord('A') == 65){ |
13 | Encode::define_alias( 'Unicode' => 'Internal' ); |
14 | } |
df1df145 |
15 | |
16 | sub decode |
17 | { |
18 | my ($obj,$str,$chk) = @_; |
19 | utf8::upgrade($str); |
20 | $_[1] = '' if $chk; |
21 | return $str; |
22 | } |
23 | |
24 | *encode = \&decode; |
25 | 1; |
26 | __END__ |
48e3bbdd |
27 | |
28 | =head1 NAME |
29 | |
30 | Encode::Internal -- for internal use only |
31 | |
32 | =cut |