Skip to content
Browse files

using the _pushback method instead of seek per Jason's suggestion.

svn path=/bioperl-live/trunk/; revision=16468
  • Loading branch information...
1 parent 1d146f6 commit 7d6e069e283603dba999467717060c4b63394f0e scain committed with carandraug
Showing with 4 additions and 3 deletions.
  1. +4 −3 Bio/FeatureIO/gff.pm
View
7 Bio/FeatureIO/gff.pm
@@ -298,8 +298,8 @@ sub write_feature {
Returns : value of fasta_mode (a scalar)
Args : on set, new value (a scalar or undef, optional)
-Side effect: rewind the file handle a little bit to get the last carriage return
-that was swallowed when the previous line was processed.
+Side effect when setting: rewind the file handle a little bit to get the last
+carriage return that was swallowed when the previous line was processed.
=cut
@@ -309,7 +309,8 @@ sub fasta_mode {
$self->{'fasta_mode'} = $val if defined($val);
if ($val == 1) {
- seek $self->_fh(), -1, 1; #rewind 1 byte to get the previous line's \n
+ # seek $self->_fh(), -1, 1; #rewind 1 byte to get the previous line's \n
+ $self->_pushback("\n");
}
return $self->{'fasta_mode'};

0 comments on commit 7d6e069

Please sign in to comment.
Something went wrong with that request. Please try again.