tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / Bio / DB / GFF / Adaptor / ace.pm
blobbffd3c3559d2174c6cbfe6139bd9838eb18496ae
1 package Bio::DB::GFF::Adaptor::ace;
3 =head1 NAME
5 Bio::DB::GFF::Adaptor::ace -- ace interface (for multiple inheritance)
7 =head1 SYNOPSIS
9 Pending
11 See L<Bio::DB::GFF> and L<Bio::DB::GFF::Adaptor::dbi::mysql>
13 =head1 SEE ALSO
15 L<Bio::DB::GFF>, L<bioperl>
17 =head1 AUTHOR
19 Lincoln Stein E<lt>lstein@cshl.orgE<gt>.
21 Copyright (c) 2002 Cold Spring Harbor Laboratory.
23 This library is free software; you can redistribute it and/or modify
24 it under the same terms as Perl itself.
26 =cut
28 use strict;
29 use Ace;
30 use Bio::DB::GFF::Util::Rearrange; # for rearrange()
32 sub dna_db {
33 my $self = shift;
34 my $d = $self->{dna_db};
35 $self->{dna_db} = shift if @_;
36 $d;
38 sub acedb {
39 my $self = shift;
40 my $d = $self->{acedb};
41 $self->{acedb} = shift if @_;
42 $d;
45 =head2 freshen_ace
47 Title : freshen
48 Usage : $flag = Bio::DB::GFF->freshen_ace;
49 Function: Refresh internal acedb handle
50 Returns : flag if correctly freshened
51 Args : none
52 Status : Public
54 ACeDB has an annoying way of timing out, leaving dangling database
55 handles. This method will invoke the ACeDB reopen() method, which
56 causes dangling handles to be refreshed. It has no effect if you are
57 not using ACeDB to create ACeDB objects.
59 =cut
61 sub freshen_ace {
62 my $acedb = shift->acedb or return;
63 $acedb->reopen();