perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: confusing error message patch
Date Thu, 09 Mar 2006 02:21:10 GMT


Philippe M. Chiasson wrote:
> Frank Wiles wrote:
> 
>>  Hey Everyone, 
>>
>>  Saw the thread about $r->read($buf,0) and figured it would be wise
>>  to fix the error message to keep someone else from getting confused. 
>>
>>  Here is a small patch to change "The LENGTH argument can't be
>>  negative" to "The LENGTH argument can't be negative or zero".  
> 
> 
> How about one of these ?
> 
> "The LENGTH argument must be a positive number"
> "The LENGTH argument must be > 0"
> "The LENGTH argument must be >= 1"
> "The LENGTH argument must be greater than zero"

have we actually demonstrated that $r->read($buf,0) is an error?  almost
definitely useless, sure, but an error?  or maybe the problem is a loop
might read and return true indefinitely, so

  while ($r->read($buf,$len)) { ... }

would be bad?

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message