koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: paul POULAIN
Subject: [Koha-devel] Koha and MARC::Record 1.25
Date: Thu May 8 17:20:04 2003
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]