NAME

MARC::Fast - Very fast implementation of MARC database reader

SYNOPSIS

use MARC::Fast;

DESCRIPTION

This is very fast alternative to MARC and MARC::Record modules.

It's is also very sutable for random access to MARC records (as opposed to sequential one).

METHODS

new

Read MARC database

  my $marc = new MARC::Fast(
  	marcdb => 'unimarc.iso',
	quiet => 0,
	debug => 0,
	assert => 0,
	hash_filter => sub {
		my ($t, $record_number) = @_;
		$t =~ s/foo/bar/;
		return $t;
	},
  );

count

Return number of records in database

print $marc->count;

fetch

Fetch record from database

my $hash = $marc->fetch(42);

to_hash

Read record with specified MFN and convert it to hash

my $hash = $marc->to_hash($mfn);

It has ability to convert characters (using hash_filter) from MARC database before creating structures enabling character re-mapping or quick fix-up of data.

This function returns hash which is like this:

'200' => [
           {
             'i1' => '1',
             'i2' => ' '
             'a' => 'Goa',
             'f' => 'Valdo D\'Arienzo',
             'e' => 'tipografie e tipografi nel XVI secolo',
           }
         ],

This method will also create additional field 000 with MFN.

to_ascii

print $marc->to_ascii( 42 );

AUTHOR

Dobrica Pavlinusic
CPAN ID: DPAVLIN
dpavlin@rot13.org
http://www.rot13.org/~dpavlin/

COPYRIGHT

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

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

Biblio::Isis, perl(1).