Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 121013
Status: open
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: MITHALDU [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: can we add documentation and tests for interaction of the various functions with undef as argument?
Download (untitled) / with headers
text/plain 364b
Due to LU being XS it is a bit of a black box, and "check the code and reason it out" doesn't work so well for figuring out what it does with undefined arguments. The tests themselves don't ensure that a certain behavior happens either. As such, can we define what the functions *should* do, document that, and add tests? I'm happy to write the tests if needed.
Download (untitled) / with headers
text/plain 166b
Related: Handling of strings is also involved, so a general bit about non-numerical inputs is warranted. Brainstorming is happening in IRC, will add results tomorrow.
Download (untitled) / with headers
text/plain 206b
21:55 <Grinnz> "Non-numerical values, such as undef and strings, are compared as with core numeric operators; namely by treating them as zero and raising a warning in the numeric category" -- Paul Evans
Download (untitled) / with headers
text/plain 534b
I wrote a number of tests for functions where it seemed like having undef arguments would be usefully different from other types of arguments. https://github.com/Dual-Life/Scalar-List-Utils/pull/54 If i missed out on any that could deserve some tests, i'm happy to add them. I also marked a number of them with XXX where i thought they might deserve double-checking of whether the behavior is as expected. And lastly, it includes a bit of documentation about the behavior checked by these tests. Feedback on that much appreciated.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.