Skip Menu |

This queue is for tickets about the UNIVERSAL-can CPAN distribution.

Report information
The Basics
Id: 17015
Status: resolved
Worked: 40 min
Priority: 0/
Queue: UNIVERSAL-can

Owner: chromatic [...]
Requestors: adamk [...]

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

Subject: Does not test for response-equivalence to actual UNIVERSAL::can
Download (untitled) / with headers
text/plain 736b
Warnings aside, the intent of UNIVERSAL::can is to behave like the default case for non-callable things. But the test scripts to not systematically cover the non-invocable cases to check that this is the case (the undef example in the script being just one case). You should also add all of the following and call both UNIVERSAL::can directly, then your replaced version, and check the results. undef, '', 0, \'', [], {}, sub foo {}, etc etc Pretty much just create a list of whatever crazy evil stuff you can dream up and interate the list testing equivalence. Otherwise how am I to trust that it actually will return the same... The UNIVERSAL::isa case doesn't do this either, and I managed to find 3 failures in a few minutes.
Download (untitled) / with headers
text/plain 113b
Good idea. I added these tests to t/bad-input.t and fixed a bug that they revealed. Thanks; 1.03 is on its way.

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

Please report any issues with to