Only return true values and undef from READLINE in scalar context68/head
commit94c424fb2c3688f48c3236f3fc6d4d2522ed6cd0
authorThomas Sibley <trsibley@uw.edu>
Wed, 7 May 2014 23:11:02 +0000 (7 16:11 -0700)
committerThomas Sibley <trsibley@uw.edu>
Wed, 7 May 2014 23:19:38 +0000 (7 16:19 -0700)
treea3f2d70087f93e127be3260ba3f5713f29fa0931
parent5451e4d592a39020178c6c1ff575dd07e35fcce8
Only return true values and undef from READLINE in scalar context

The common readline idiom

    while (<$in>)

checks defined-ness and doesn't work as expected when defined-but-false
values such as 0 or the empty string are returned.  Since these are tied
objects mocking filehandles which deal in records not strings, returning
0 or "" is never expected or desired.

This is a guard against bugs such as those in 5451e4d.
Bio/AlignIO.pm
Bio/Assembly/IO.pm
Bio/ClusterIO.pm
Bio/DB/IndexedBase.pm
Bio/Matrix/IO.pm
Bio/PopGen/IO.pm
Bio/SearchIO.pm
Bio/SeqIO.pm
Bio/Structure/IO.pm
Bio/Tools/GFF.pm
Bio/TreeIO.pm