# Takes the output directory name $annotationDirName # and a hash-ref of all attribtues of a sequence and # adds it to database '$annotationDirName/annotation.dat'. # Given attribute hash is stored as hash-dump. sub _printAnnotation{ my ($annotationDirName,$h) = @_; # create new Berkeley_DB my %database; tie %database, 'DB_File', "$annotationDirName/annotation.dat" or die "Can't initialize database: $!\n"; my $dump = Data::Dumper->new([$h],[qw($annotation)])->Purity(1)->Dump(); $database{$h->{'id'}} = $dump; untie %database; }