Burak Gürsoy via RT wrote:
Hi Burak
Show quoted text> This was intended and mentioned in the Pod (perhaps it was not clear).
You're right - there is something in the POD:
SECONDS must be a number representing the elapsed seconds. If it is
false, 0 (zero) will be used. If it is not defined, undef will be returned.
But this does not say undef is /returned/. And I think it's a design
fault to return undef for 0, since this messes up the print-out of the
program, where 0 is a valid value for the time taken for some task.
Returning undef when the input is undef makes sense.
Show quoted text> Anyway, I've released a new version(0.16) and changed the behaviour.
> Undefined parameters will return undef and any other false parameter
> will return "0 second".
Thanx. But in English that should say '0 seconds', whereas we say '1
second', '2 seconds', etc. It's only 1 that has second after it :-(.
--
Ron Savage
ron@savage.net.au
http://savage.net.au/