MARC::Lint bug?

[email protected] (Bryan Baldus)
Newsgroups perl.perl4lib
Message-ID <1F95E99A11EFA541B0BDE754166A8F70C7393D@qbiex.qbi.quality-books.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.