Hi,

The following code :
       my $marcrecord = MARC::File::USMARC::decode($marcarray[$i]."\x1D");
       warn "ref : ".ref($marcrecord);
      ... inclusion in Koha DB ...

works fine with a valid iso2709 record in $marcarray[$i].
With something not valid (like a random value), it returns that ref($marcrecord) is MARC::Record.
So, how to know that the decoded variable is NOT a valid marc record ?


other question : how works ->warnings ?
I tried $marcrecord->warnings(), but I only get a number.

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




Reply via email to