Skip to content
Snippets Groups Projects
Commit 37ad8a49 authored by Graham McVicker's avatar Graham McVicker
Browse files

changed constructors to take arguments

parent fdb511c8
No related branches found
No related tags found
No related merge requests found
......@@ -37,13 +37,9 @@ use vars qw(@ISA);
use strict;
sub new {
my($class,@args) = @_;
my($class,$from,$to,$ori) = @_;
my $self = {};
bless $self,$class;
# set stuff in self from @args
return $self;
return bless {'from' => $from, 'to' => $to, 'ori' => $ori}, $class;
}
......
......@@ -28,37 +28,19 @@ This module is part of the Ensembl project http://www.ensembl.org
Post general queries to B<ensembl-dev@ebi.ac.uk>
=head1 APPENDIX
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
=head1 METHODS
=cut
# Let the code begin...
package Bio::EnsEMBL::Mapper::Unit;
use vars qw(@ISA);
use strict;
# Object preamble - inherits from Bio::EnsEMBL::Root
use Bio::EnsEMBL::Root;
@ISA = qw(Bio::EnsEMBL::Root);
# new() is written here
sub new {
my($class,@args) = @_;
my $self = {};
bless $self,$class;
my($class, $id, $start, $end) = @_;
# set stuff in self from @args
return $self;
return bless {'id' => $id, 'start' => $start, 'end' => $end}, $class;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment