The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MARC::SubjectMap::Rules - storage for rules

SYNOPSIS

    my $rules = MARC::SubjectMap->new();
    $rules->addRule( $rule );

DESCRIPTION

Since there may be a very large set of translation rules in a given configuration the MARC::SubjectMap::Rules class allows the rules and lookup tables to stored on disk rather than memory.

METHODS

new()

Create rule storage.

addRule()

Add a rule to the rules storage. A rule must be a MARC::SubjectMap::Rule object.

    $rules->addRule( $rule );

getRule()

Look up a rule in storage using the field, subfield and original text. If no rule is found you will be returned undef.

    my $rule = $rules->getRule( field => '600', subfield => 'a', 
        original => 'Africa' );