Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Stopping redefined subroutine warnings. #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#### General stuff
/tabix
/bgzip
/perl/Tabix*.c

#### C stuff
# Object files
*.o
*.ko
*.obj
*.elf

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

#### Perl stuff
/perl/blib/
/perl/.build/
/perl/_build/
/perl/cover_db/
/perl/inc/
/perl/Build
/perl/!Build/
/perl/Build.bat
/perl/.last_cover_stats
/perl/Makefile
/perl/Makefile.old
/perl/MANIFEST.bak
/perl/META.yml
/perl/META.json
/perl/MYMETA.*
nytprof.out
/perl/pm_to_blib
*.o
*.bs

/.perl-version
1 change: 0 additions & 1 deletion perl/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ MANIFEST
typemap
Tabix.xs
Tabix.pm
TabixIterator.pm
Makefile.PL
t/01local.t
t/02remote.t
30 changes: 28 additions & 2 deletions perl/Tabix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use strict;
use warnings;
use Carp qw/croak/;

use TabixIterator;

require Exporter;

our @ISA = qw/Exporter/;
Expand Down Expand Up @@ -72,5 +70,33 @@ sub getnames {
return tabix_getnames($self->{_});
}

package TabixIterator;

use strict;
use warnings;

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::tabix_iter_free($self->{_}) if ($self->{_});
}

1;
__END__
2 changes: 0 additions & 2 deletions perl/Tabix.xs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ tabix_getnames(t)
XPUSHs(sv_2mortal(newSVpv(names[i], 0)));
free(names);

MODULE = Tabix PACKAGE = TabixIterator

void
tabix_iter_free(iter)
ti_iter_t iter
Expand Down
41 changes: 0 additions & 41 deletions perl/TabixIterator.pm

This file was deleted.