Skip to content

to return undef when reaching file end #64

merged 1 commit into from Jan 28, 2014

2 participants


otherwise while(next_aln) loops forever.

yschensandiego to return undef when reaching file end
otherwise while(next_aln) loops forever.
BioPerl member

yschensandiego, could you please attach or paste or link a, preferably small, file where this situation actually happens to check it and make it a test case example?? Also for the bl2seq+ issue.


Reading an empty file can show the issue:

my $empty = Bio::AlignIO->new(
                "-file"   => "C:\\Temp\\Empty.phy",
                "-format" => "phylip" 

while(my $a = $empty->next_aln()) 
       # infinite loop
BioPerl member

Confirmed the issue, good catch!
I checked the behaviour of the other AlignIO formats and some just silently pass the "->next_aln" cycle and others die with an error, but none enter in infinite loop. I'm merging this request. Thanks!

@fjossandon fjossandon merged commit 7a9ff8e into bioperl:master Jan 28, 2014

1 check passed

Details default The Travis CI build passed
@yschensandiego yschensandiego deleted the yschensandiego:patch-2 branch Jan 28, 2014

Hi Francisco, thanks for the quick action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.