I think I may have discovered a bug in the way MARC::Lint parses tag data.
In _parse_tag_rules:

    my $rules = ($self->{_rules}->{$tagno} ||= {});
    $rules->{$repeatable} = $repeatable;

then:
    for my $line ( @lines ) {
        my @keyvals = split( /\s+/, $line, 3 );
        my $key = shift @keyvals;
        my $val = shift @keyvals;
        # Do magic for indicators
        if ( $key =~ /^ind/ ) {
            $rules->{$key} = $val;
#}

I think having $rules->{$repeatable} and $rules->{$key} (where $key is the
subfield code and $repeatable is passed in from the
tagno_repeatability_description line of the tag data) is causing $repeatable
to be added as an allowable subfield code. I discovered this when wondering
why an 082 $a[B]$ROU$214 did not report an error. I plan on looking at this
tonight or this weekend. What would you suggest as the best way to resolve
this problem? My current line of thinking would have me revising
$rules->{$repeatable} to $rules->{'repeatable'}, and leaving the subfields
as $rules->{$key}. Does this sound reasonable?

Thank you for your assistance,

Bryan Baldus
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://home.inwave.com/eija
 

Reply via email to