[Bioperl-l] patch to FeatureIO.pm for tied interface
Cook, Malcolm
MEC at Stowers-Institute.org
Thu Mar 31 16:41:42 EST 2005
bioperlers,
The following patch to bioperl-live makes up for what was probably a
copy and paste error and lets FeatureIO work with tied handle interface
too.
I would be happy to have write access to cvs repository for this and
other such patches as discovered....
Cheers,
Malcolm Cook
Index: FeatureIO.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/FeatureIO.pm,v
retrieving revision 1.8
diff -c -r1.8 FeatureIO.pm
*** FeatureIO.pm 18 Jan 2005 05:22:11 -0000 1.8
--- FeatureIO.pm 31 Mar 2005 21:34:33 -0000
***************
*** 507,526 ****
sub TIEHANDLE {
my ($class,$val) = @_;
! return bless {'seqio' => $val}, $class;
}
sub READLINE {
my $self = shift;
! return $self->{'seqio'}->next_seq() unless wantarray;
my (@list, $obj);
! push @list, $obj while $obj = $self->{'seqio'}->next_seq();
return @list;
}
sub PRINT {
my $self = shift;
! $self->{'seqio'}->write_seq(@_);
}
1;
--- 507,526 ----
sub TIEHANDLE {
my ($class,$val) = @_;
! return bless {'featio' => $val}, $class;
}
sub READLINE {
my $self = shift;
! return $self->{'featio'}->next_feature() unless wantarray;
my (@list, $obj);
! push @list, $obj while $obj = $self->{'featio'}->next_feature();
return @list;
}
sub PRINT {
my $self = shift;
! $self->{'featio'}->write_feature(@_);
}
1;
More information about the Bioperl-l
mailing list