#!perl
# Write to a Boulder::Store using DB_File
use strict;
no warnings; # ignore initialization errors
use Boulder::Store; # Store of Stones
use Boulder::Stream; # Stream of Stones
my $store = Boulder::Store->new('genbank.db',1);
# Index added to avoid initialization errors later
$store->add_index('Accession');
my $stream = Boulder::Stream->new( );
my ($stone, $dna, $index);
while ( $stone = $stream->get( ) ) {
$dna = $stone->Sequence;
$stone->insert(Writing=>"OK");
$index = $store->write_record($stone);
print "Writing $index: dna of length ",length($dna), " bp.\n";
}