[Koha-devel] Koha and MARC::Record 1.25

paul POULAIN paul.poulain at free.fr
Thu May 8 17:20:04 CEST 2003


Hi ed,

I've just dl and install the last version of MARC::Record.
In my error log, i get dozens of :
Use of uninitialized value in hash element at 
/usr/lib/perl5/site_perl/5.8.0/MARC/Record.pm line 206, 
<fh00001env174.1.txt> line 1.

I hadn't such lines before. Do you have an explanation ?

This happends (at least) in the following code. The MARC data comes from 
an external source (various sources doesn't change anything) :

In Breeding.pm :
my $marcrecord = MARC::File::USMARC::decode($marcarray[$i]."\x1D");
...
my $oldbiblio = MARCmarc2koha($dbh,$marcrecord);
...

MARCmarc2koha calls MARCmarc2kohaOneField for each field :
sub MARCmarc2kohaOneField {
    my ($sth,$kohatable,$kohafield,$record,$result)= @_;
    my $res="";
    my $tagfield;
    my $subfield;
    $sth->execute($kohatable.".".$kohafield);
    ($tagfield,$subfield) = $sth->fetchrow;
    foreach my $field ($record->field($tagfield)) {
        if ($field->subfield($subfield)) {
        if ($result->{$kohafield}) {
            $result->{$kohafield} .= " | ".$field->subfield($subfield);
        } else {
            $result->{$kohafield}=$field->subfield($subfield);
        }
        }
    }
    return $result;
}

NOTE : I haven't found marc::record mailing lists ?

-- 
Paul POULAIN
Consultant indépendant en logiciels libres
responsable francophone de koha (SIGB libre http://www.koha-fr.org)






More information about the Koha-devel mailing list