X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=Equinox-Migration%2Flib%2FEquinox%2FMigration%2FMapDrivenMARCXMLProc.pm;fp=Equinox-Migration%2Flib%2FEquinox%2FMigration%2FMapDrivenMARCXMLProc.pm;h=83cb06016c3193c9bf9432c6d9fefc6a7420a8f7;hp=d78c5284066cce4759d3bf2e00fc236fa1311830;hb=df9e0862d7090f8daaf9fc07c449c9dbdee89d05;hpb=69ca50f0514a2bf1626005925c134cb7e268556e diff --git a/Equinox-Migration/lib/Equinox/Migration/MapDrivenMARCXMLProc.pm b/Equinox-Migration/lib/Equinox/Migration/MapDrivenMARCXMLProc.pm index d78c528..83cb060 100644 --- a/Equinox-Migration/lib/Equinox/Migration/MapDrivenMARCXMLProc.pm +++ b/Equinox-Migration/lib/Equinox/Migration/MapDrivenMARCXMLProc.pm @@ -65,7 +65,9 @@ sub new { die "Datastore file 'EMMXSSTORAGE.dbmd' already exists. Exiting.\n" if (-e "EMMXSSTORAGE.dbmd"); $dstore = DBM::Deep->new( file => "EMMXSSTORAGE.dbmd", - data_sector_size => 256 ); + data_sector_size => 256, + autoflush => 0, + ); $reccount = 0; # next record ptr $dstore->{tags} = $sfmap->tags; # list of all tags $self->{data} = $dstore; @@ -157,7 +159,6 @@ sub process_subs { # fetch our datafield struct and fieldname my $dataf = $crec->{tags}[-1]; my $field = $sfmap->field($tag, $code); - $crec->{names}{$tag}{$code} = $field; # test filters for my $filter ( @{$sfmap->filters($field)} ) { @@ -210,13 +211,13 @@ sub recno { my ($self) = @_; return $self->{data}{rcnt} } =head2 name -Returns mapped fieldname when passed a record number, tag, and code +Returns mapped fieldname when passed a tag, and code - my $name = $m->name(3,999,'a'); + my $name = $m->name(999,'a'); =cut -sub name { my ($self, $r, $t, $c) = @_; return $dstore->{recs}[$r]{names}{$t}{$c} }; +sub name { my ($self, $t, $c) = @_; return $sfmap->field($t, $c) } =head1 MODIFIERS