NAME

MARC::Moose::Formater::UnimarcToMarc21 - Convert biblio record from UNIMARC to MARC21

VERSION

version 0.026

SYNOPSYS

Read a UNIMARC ISO2709 file and dump it to STDOUT in text transformed into MARC21:

 my $reader = MARC::Moose::Reader::File::Iso2709->new(
   file => 'biblio-unimarc.iso' );
 my $formater = MARC::Moose::Formater::UnimarcToMarc21->new();
 while ( my $unimarc = $reader->read() ) {
   my $marc21 = $formater->format($unimarc);
   print $marc21->as('Text');
 }

Same with shortcut:

 my $reader = MARC::Moose::Reader::File::Iso2709->new(
   file => 'biblio-unimarc.iso' );
 while ( my $unimarc = $reader->read() ) {
   print $unimarc->as('UnimarcToMarc21')->as('Text');
 }

Read a UNIMARC ISO2709 file and dump it to another ISO2709 file transformed into MARC21:

 my $reader = MARC::Moose::Reader::File::Iso2709->new(
   file => 'biblio-unimarc.iso' );
 my $writer = MARC::Moose::Writer::File->new(
   file => 'biblio-marc21.iso',
   formater => MARC::Moose::Formater::Iso2709->new()
 );
 my $tomarc21 = MARC::Moose::Formater::UnimarcToMarc21->new();
 while ( my $unimarc = $reader->read() ) {
   $writer->write( $tomarc21->format($unimarc) );
 }

AUTHOR

Frédéric Demians <f.demians@tamil.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Frédéric Demians.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.