1 package WebPAC::Input::MARC;
13 WebPAC::Input::MARC - support for MARC database files
21 our $VERSION = '0.01';
26 Open USMARC, Unimarc or any other file format that has same internal
27 structure using C<MARC::Fast>.
29 my $marc = new WebPAC::Input::MARC();
30 $marc->open( path => '/path/to/marc.iso' );
36 Returns handle to database
39 path => '/path/to/marc.iso'
49 my $log = $self->_get_logger();
51 $log->info("opening MARC database '$arg->{path}'");
53 my $db = new MARC::Fast( marcdb => $arg->{path});
54 my $db_size = $db->count;
56 return ($db, $db_size);
61 Return record with ID C<$mfn> from database
63 my $rec = $self->fetch_rec( $db, $mfn );
74 return $db->fetch($mfn);
79 Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
81 =head1 COPYRIGHT & LICENSE
83 Copyright 2005 Dobrica Pavlinusic, All Rights Reserved.
85 This program is free software; you can redistribute it and/or modify it
86 under the same terms as Perl itself.
90 1; # End of WebPAC::Input::MARC