Bio::DB::GFF::Adaptor::dbi iterator
Package variablesGeneral documentationMethods
Package variables
No package variables defined.
Synopsis
No synopsis!
Description
No description!
Methods
new
No description
Code
next_feature
No description
Code
Methods description
None available.
Methods code
newdescriptionprevnextTop
sub new {
  my $class = shift;
  my ($sth,$callback) = @_;
  return bless [$sth,$callback,[]],$class;
}
next_featuredescriptionprevnextTop
sub next_feature {
  my $self = shift;
  return shift @{$self->[CACHE]} if @{$self->[CACHE]};
  my $sth = $self->[STH] or return;
  my $callback = $self->[CALLBACK];

  my $features;
  while (1) {
    if (my @row = $sth->fetchrow_array) {
      $features = $callback->(@row);
      last if $features;
    } else {
      $sth->finish;
      undef $self->[STH];
      $features = $callback->();
      last;
    }
  }
  $self->[CACHE] = $features or return;
  shift @{$self->[CACHE]};
}
General documentation
No general documentation available.