Ed Summers > MARC-Detrans > MARC::Detrans::Rules

Download:
MARC-Detrans-1.41.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

MARC::Detrans::Rules - A set of detransliteration rules

SYNOPSIS ^

    use MARC::Detrans::Rules;
    my $rules = MARC::Detrans::Rules->new();
    $rules->addRule( MARC::Detrans::Rule->new( from=>'a', to='b' ) );

DESCRIPTION ^

MARC::Detrans::Rules provides the core functionality for managing detransliteration rules and for converting transliterated text to MARC-8. A MARC::Detrans::Rules object is essentially a collection of MARC::Detrans::Rule objects which are consulted during a call to convert().

METHODS ^

new()

Create an empty rules object to add individual rules to.

addRule()

Add a MARC::Detrans::Rule to the rules object.

convert()

convert() applies the rules contained in the MARC::Detrans::Rules object to convert a string that is passed in.

error()

Will return the latest error encountered during a call to convert(). Can be useful for determining why a call to convert() failed. A side effect of calling error() is that the error slot is reset.

AUTHORS ^

syntax highlighting: