MARC::Loader - Perl extension for creating MARC record from a hash
Version 0.001001
use MARC::Loader; my $foo={ 'f010d' => '45', 'f099c' => '2011-02-03', 'f099t' => 'LIVRE', 'i0991' => '3', 'i0992' => '4', 'f101a' => [ 'lat','fre','spa'], 'f215a' => [ 'test' ], 'f700' => [{'f700f' => '1900-1950','f700a' => 'ICHER','f700b' => [ 'jean','francois']}, {'f700f' => '1353? - 1435','f700a' => 'PAULUS','f700b' => 'MARIA'}] }; my $record = MARC::Loader->new($foo); # Here, the command "print $record->as_formatted;" will return : # LDR # 010 _d45 # 099 34 _tLIVRE # _c2011-02-03 # 101 _alat # _afre # _aspa # 215 _atest # 700 _f1900-1950 # _aICHER # _bjean # _bfrancois # 700 _f1353? - 1435 # _aPAULUS # _bMARIA
This is a Perl extension for creating MARC records from a hash variable. MARC::Loader use MARC::Record.
The names of hash keys are very important. They must begin with one letter (f eg) followed the 3-digit field (099 eg) optionally followed the letter or digit of the subfield. Repeatable fields are arrays of hash ( 'f700' = [{'f700f' => '1900','f700a' => 'ICHER'},{'f700f' => '1353','f700a' => 'PAULUS'}]> eg ). Repeatable subfields are arrays ( 'f101a' = [ 'lat','fre','spa']> eg ). Indicators must begin with the letter i followed the 3-digit field followed by the indicator's position (1 or 2) : i0991 eg.
f
099
'f700' =
'f101a' =
i0991
$record = MARC::Loader->new($foo);
it's the only function you'll use.
Stephane Delaune, (delaune.stephane at gmail.com)
Copyright 2011 Stephane Delaune for Biblibre.com, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
MARC::Record (http://search.cpan.org/~gmcharlt/MARC-Record/lib/MARC/Record.pm)
MARC::Field (http://search.cpan.org/~gmcharlt/MARC-Record/lib/MARC/Field.pm)
Library Of Congress MARC pages (http://www.loc.gov/marc/)
The definitive source for all things MARC.
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install MARC::Loader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MARC::Loader
CPAN shell
perl -MCPAN -e shell install MARC::Loader
For more information on module installation, please visit the detailed CPAN module installation guide.