From d0e75c288cf92eb348d7b98e92e97f1b2b85b513 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 3 Nov 2006 20:40:38 +0000 Subject: [PATCH] r1124@llin: dpavlin | 2006-11-03 21:39:00 +0100 use MARC::Fast 0.05 to_ascii to implement dump_rec git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@772 07558da8-63fa-0310-ba24-9fe276d99e06 --- Makefile.PL | 2 +- lib/WebPAC/Input/MARC.pm | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 6226bac..4a0a76c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -25,7 +25,7 @@ WriteMakefile( 'LWP' => 0, 'File::Path' => 0, 'Biblio::Isis' => 0.23, - 'MARC::Fast' => 0.02, + 'MARC::Fast' => 0.05, 'Search::Estraier' => 0.06, 'List::Util' => 0, 'Spreadsheet::ParseExcel', => 0, diff --git a/lib/WebPAC/Input/MARC.pm b/lib/WebPAC/Input/MARC.pm index 987bab1..691d380 100644 --- a/lib/WebPAC/Input/MARC.pm +++ b/lib/WebPAC/Input/MARC.pm @@ -12,11 +12,11 @@ WebPAC::Input::MARC - support for MARC database files =head1 VERSION -Version 0.06 +Version 0.07 =cut -our $VERSION = '0.06'; +our $VERSION = '0.07'; =head1 SYNOPSIS @@ -88,6 +88,23 @@ sub fetch_rec { } } +=head2 dump_rec + +Return dump of record with ID C<$mfn> from database + + my $rec = $self->fetch_rec( $mfn ); + +} + +=cut + +sub dump_rec { + my $self = shift; + + my $mfn = shift; + return $self->{_marc_db}->to_ascii($mfn); +} + =head2 size Return number of records in database -- 2.20.1