MARC::Detrans::Rule
use MARC::Detrans::Rule; my $rule = MARC::Detrans::Rule->new( from => 'b', to => 'B', escape => '(B' );
It's unlikely that you'll want to use MARC::Detrans::Rule directly since other modules wrap access to it. Each detransliteration rule is represented as a MARC::Detrans::Rule object, which basically provides the Romanized text and the corresponding MARC-8 or UTF-8 text, along with an escape character (for MARC-8) rules.
Pass in the from and c<to> parameters which define the original text and what to translate to; these parameters are not limited to single characters. In addition an escape parameter can be passed in to indicate a MARC-8 escape sequence to use. Also a position parameter can be set to initial, medial or final if the rule applies only when the character is found at or within a particular word boundary.
from
escape
position
initial
medial
final
Returns the Romanized text that this rule refers to.
Returns the MARC-8 or UTF-8 text that the corresponding Romanized text should be converted to.
Returns a MARC-8 character set escape sequence to be used, or undef if the rule is for an UTF-8 mapping.
Returns a position specification for the rule mapping which can be initial, medial, final or the empty string if there is no positional qualification for the rule.
Ed Summers <ehs@pobox.com>
To install MARC::Detrans, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MARC::Detrans
CPAN shell
perl -MCPAN -e shell install MARC::Detrans
For more information on module installation, please visit the detailed CPAN module installation guide.