- # only proceed if MARC21 or UNIMARC; else clause is executed if marcflavour set it to NORMARC
- # generate MARC::Record object to see if not a marcxml record
- unless ( C4::Context->preference('marcflavour') eq 'NORMARC' ) {
- eval { $record = MARC::Record->new_from_xml(
- $marcxml,
- 'UTF-8',
- C4::Context->preference('marcflavour')
- );
- };
- } else {
- eval { $record = MARC::Record->new_from_xml(
- $marcxml,
- 'UTF-8',
- 'MARC21'
- );
- };
- }