in reply to Re^8: List::Util::sum() and empty lists... (obvious)
in thread List::Util::sum() and empty lists...

Maybe. Maybe not. Only he can confirm if it indeed is a genuine oversight or not.

But since this behaviour is quite clearly documented in the POD for the module, and that the module has been around for almost a decade now, I'm not convinced the behaviour is due to an oversight. But again, the POD could be wrong or script-generated.

Only Graham or P5P can give us a definite, authoritative statement for the reasons his module behaves the way it does, until then, it's play by the rules in the POD, i suppose?



perl -e '$,=$",$_=(split/\W/,$^X)[y[eval]]]+--$_],print+just,another,split,hack'er

Replies are listed 'Best First'.
Re^10: List::Util::sum() and empty lists... (obvious)
by ikegami (Patriarch) on Dec 05, 2006 at 08:13 UTC

    that the module has been around for almost a decade now, I'm not convinced the behaviour is due to an oversight.

    Contrary to what's been said, undef is not the same as zero, so fixing it would break backwards compatibility. The greater the length of time since it has been decided, the harder it is to fix. It doesn't lessen the chance of it being an oversight.

    A reply falls below the community's threshold of quality. You may see it by logging in.