1Locale::RecodeData(3) User Contributed Perl DocumentationLocale::RecodeData(3)
2
3
4

NAME

6       Locale::RecodeData - Abstract Base Class for Charset Converters
7

SYNOPSIS

9           # For compatibility with Perl 5.005 and earlier, you must
10           # *use* the module before inheriting from it!
11           use qw (Locale::RecodeData);
12           use base qw (Locale::RecodeData);
13

DESCRIPTION

15       The module Locale::RecodeData serves as an abstract base class to all
16       converters used by Locale::Recode(3).
17
18       Adding new conversion modules is currently not straightforward, and you
19       will have to edit the sources of some modules for that purpose.
20
21       First, you have to add your new converter class to the list found in
22       Locale::_Conversions(3), so that Locale::Recode(3) knows about its
23       presence.  If there are valid aliases for the codeset of your
24       converter, you will also have to edit Locale::_Aliases(3).
25
26       Finally, you have to implement the (protected) conversion routine
27       _recode().  See below ("INTERFACE") for details.
28

CONSTRUCTOR

30       new (from => FROM_CODESET, to => TO_CODESET)
31           The constructor takes two (named) arguments:
32
33           from    The canonical name of the source codeset.  Aliases have
34                   already been resolved and the name is converted to
35                   uppercase.
36
37           to      The canonical name of the destination codeset.  Aliases
38                   have already been resolved and the name is converted to
39                   uppercase.
40
41           You normally don't have to implement the constructor.  The default
42           constructor implemented here will store the source and destination
43           codesets in the protected members "_from" and "_to".
44

METHODS

46       The class implements one method:
47
48       _getError
49           Returns the (protected) member "_error".
50

INTERFACE

52       New conversion classes must provide the following interface:
53
54       new (from => FROM_CODESET, to => TO_CODESET)
55           The constructor takes two (named) arguments:
56
57           from    The canonical name of the source codeset.  Aliases have
58                   already been resolved and the name is converted to
59                   uppercase.
60
61           to      The canonical name of the destination codeset.  Aliases
62                   have already been resolved and the name is converted to
63                   uppercase.
64
65       _getError
66           Should return the last error (as a string) or false if there was no
67           error.
68
69           This method is implemented in the base class already.
70
71       _recode STRINGREF
72           Should convert the argument "STRINGREF" in-place.  In case of
73           failure, return false, and make provisions that the method
74           "_getError()" returns an informative error message.
75

AUTHOR

77       Copyright (C) 2002-2017 Guido Flohr <http://www.guido-flohr.net/>
78       (<mailto:guido.flohr@cantanea.com>), all rights reserved.  See the
79       source code for details!code for details!
80

SEE ALSO

82       Locale::Recode::_Aliases(3pm), Locale::Recode::_Conversions(3pm),
83       Locale::Recode(3pm), perl(1)
84

POD ERRORS

86       Hey! The above document had some coding errors, which are explained
87       below:
88
89       Around line 173:
90           =cut found outside a pod block.  Skipping to next block.
91
92
93
94perl v5.30.1                      2020-01-30             Locale::RecodeData(3)
Impressum