=head1 VERSION
-Version 1.003
+Version 1.004
=cut
-our $VERSION = '1.003';
+our $VERSION = '1.004';
my $dstore;
my $sfmap;
mods => \@mods );
# initialize datastore
- die "Datastore file 'EMMXSSTORAGE.dbmd' already exists. Exiting.\n"
- if (-e "EMMXSSTORAGE.dbmd");
- $dstore = DBM::Deep->new( file => "EMMXSSTORAGE.dbmd",
- max_buckets => 64,
- #data_sector_size => 256,
- autoflush => 0,
- );
+ #die "Datastore file 'EMMXSSTORAGE.dbmd' already exists. Exiting.\n"
+ # if (-e "EMMXSSTORAGE.dbmd");
+ #$dstore = DBM::Deep->new( file => "EMMXSSTORAGE.dbmd",
+ # max_buckets => 64,
+ # #data_sector_size => 256,
+ # autoflush => 0,
+ # );
+ $dstore = {};
$reccount = 0; # next record ptr
$dstore->{tags} = $sfmap->tags; # list of all tags
$self->{data} = $dstore;
return $self;
}
-sub DESTROY { unlink "EMMXSSTORAGE.dbmd" }
-
=head2 parse_record
Extracts data from the next record, per the mapping file.
$reccount++;
# check for required fields
- check_required();
+ check_required($crec);
push @{ $dstore->{recs} }, $crec;
print STDERR "$reccount\n"
sub check_required {
+ my ($crec) = @_;
my $mods = $sfmap->mods;
- my $crec = $dstore->{crec};
for my $tag_id (keys %{$mods->{required}}) {
for my $code (@{$mods->{required}{$tag_id}}) {