File: TabixIterator.pm

package info (click to toggle)
tabix 0.2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 384 kB
  • ctags: 521
  • sloc: ansic: 3,759; java: 309; python: 126; perl: 91; makefile: 53; sh: 8
file content (41 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package TabixIterator;

use strict;
use warnings;
use Carp qw/croak/;

require Exporter;

our @ISA = qw/Exporter/;
our @EXPORT = qw/tabix_iter_free/;

our $VERSION = '0.2.0';

require XSLoader;
XSLoader::load('Tabix', $VERSION);

sub new {
  my $invocant = shift;
  my $class = ref($invocant) || $invocant;
  my $self = {};
  bless($self, $class);
  return $self;
}

sub set {
  my ($self, $iter) = @_;
  $self->{_} = $iter;
}

sub get {
  my $self = shift;
  return $self->{_};
}

sub DESTROY {
  my $self = shift;
  tabix_iter_free($self->{_}) if ($self->{_});
}

1;
__END__