The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MARC::Loader - Perl extension for creating MARC record from a hash

VERSION

Version 0.001001

SYNOPSIS

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

DESCRIPTION

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.

METHOD

new()

  • $record = MARC::Loader->new($foo);

    it's the only function you'll use.

AUTHOR

Stephane Delaune, (delaune.stephane at gmail.com)

COPYRIGHT

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.

SEE ALSO

1 POD Error

The following errors were encountered while parsing the POD:

Around line 186:

=over without closing =back