[Bioperl-l] For CVS developers - potential pitfallwith "returnundef"

Hilmar Lapp hlapp at gmx.net
Wed May 31 18:31:21 UTC 2006


On May 31, 2006, at 2:14 PM, Lincoln Stein wrote:

> If the documentation says "returns false" then I expect to be able  
> to do this:
>
> 	@result = foo();
> 	die "foo() failed" unless @result;

Except if the alternative to 'false' would be a scalar, you normally  
wouldn't assign it to an array, would you?

I.e., I wouldn't expect this strict of a behavior from an open-source  
package written largely from people whose job is biological science,  
not programming perl knowing and following DC to the letter ... I'd  
rather be on the safe side and assign to a scalar.

Just my $0.02 ...

	-hilmar

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================








More information about the Bioperl-l mailing list