File: FetchIterator.pm

package info (click to toggle)
libbio-samtools-perl 1.43-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 736 kB
  • sloc: perl: 2,210; ansic: 74; makefile: 20
file content (22 lines) | stat: -rw-r--r-- 335 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Bio::DB::Bam::FetchIterator;
use strict;

sub new {
    my $self = shift;
    my $list = shift;
    my $total= shift;
    $total ||= @$list;
    return bless {list=>$list,
		  total=>$total},ref $self || $self;
}

sub next_seq {
    my $self = shift;
    return shift @{$self->{list}};
}

sub total {
    shift->{total};
}

1;