Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Scalar-Util-Numeric CPAN distribution.

Report information
The Basics
Id: 56772
Status: resolved
Priority: 0/
Queue: Scalar-Util-Numeric

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

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



Subject: Small pile of fixes
I'm considering using Scalar::Util::Numeric in perl5i to replace my ad hoc is_integer/is_decimal checks. As such I want to fix it up so it makes CPAN testers happy. Here you'll find a small pile of fixes for Scalar::Util::Numeric. I started with trying to get it working on 5.6.2 and cleaned up a few other things. http://github.com/schwern/Scalar-Util-Numeric/commits/master * AutoLoader is probably slowing down the loading of such a small module. Probably an artifact of h2xs. * 5.6's Math::BigInt doesn't have bstr() * Make the test-only deps on Math::BigInt and Math::Complex optional. 5.6.2 remains confused about the UV tests. $ perl5.6.2 -Iblib/lib -Iblib/arch t/Scalar-Util-Numeric.t 1..34 ok 1 - use Scalar::Util::Numeric; ok 2 - isnum(0) == 1 ok 3 - isnum(1) == 1 ok 4 - isnum(-1) == 9 ok 5 - isnum('0.00') == 5 ok 6 - isnum(undef) == 0 ok 7 - isnum('A') == 0 ok 8 - isnum('A0') == 0 ok 9 - isnum('0A') == 0 ok 10 - isnum(\&ok) == 0 not ok 11 - isuv($uvmax) == 1 # Failed test (t/Scalar-Util-Numeric.t at line 31) # got: '0' # expected: '1' # UVMAX: 4294967295 ok 12 - isuv(-1) == 1 not ok 13 - isbig($uvmax) == 0 # Failed test (t/Scalar-Util-Numeric.t at line 34) # got: '1' # expected: '0' ok 14 # skip Need Math::BigInt with bstr() to test numbers bigger than UV ok 15 - isfloat(3.1415927) == 1 ok 16 - isfloat(-3.1415927) == 1 ok 17 - isfloat(3) == 0 ok 18 - isfloat('1.0') ok 19 - isneg(-1) == 1 ok 20 - isneg(-3.1415927) == 1 ok 21 - isneg(1) == 0 ok 22 - isneg(3.1415927) == 0 ok 23 - isinf('Inf') == 1 ok 24 - isinf(3.1415927) == 0 ok 25 - isinf($Math::Complex::Inf) == 1 ok 26 - isint(-99) == -1 ok 27 - isint(0) == 1 ok 28 - isint(3.1415927) == 0 ok 29 - isint(-3.1415927) == 0 not ok 30 - isint($uvmax) == 1 # Failed test (t/Scalar-Util-Numeric.t at line 61) # got: '0' # expected: '1' ok 31 - isint($Math::Complex::Inf) == 0 ok 32 - isint('1.0') not ok 33 - isnan('NaN') == 1 # Failed test (t/Scalar-Util-Numeric.t at line 67) # got: '0' # expected: '1' ok 34 - isnan(42) == 0 # Looks like you failed 4 tests of 34. I don't actually care if it works on 5.6, but if 5.6 is abandoned update the use 5.006 line in the Makefile.PL so the cpan testers stop failing it.
Many thanks. I'll apply this if/when I get a chance. In the meantime, I've made you co-maintainer, so please feel free to beat me to it. If you do get a chance to do this, please free to change anything at all - minimum required version, absolutely anything. It's all yours. And please add yourself as an author in the POD/Changelog. Thanks again, chocolateboy.
Subject: Re: [rt.cpan.org #56772] Small pile of fixes
Date: Wed, 28 Apr 2010 10:09:46 -0700
To: bug-Scalar-Util-Numeric [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
On 2010.4.21 5:48 AM, chocolateboy via RT wrote: Show quoted text
> I'll apply this if/when I get a chance. In the meantime, I've made you > co-maintainer, so please feel free to beat me to it. > > If you do get a chance to do this, please free to change anything at all > - minimum required version, absolutely anything. It's all yours. And > please add yourself as an author in the POD/Changelog.
Just what I need, another module! :P But seriously, thank you. Its an honor, and I'll try to get to it shortly. I couldn't find a repository for it, so I forked the gitpan history and put it up here: https://github.com/schwern/Scalar-Util-Numeric/ You're an admin. Let me know if there's a real repo somewhere. -- 31. Not allowed to let sock puppets take responsibility for any of my actions. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
Show quoted text
> I couldn't find a repository for it, so I forked the > gitpan history and put it up here: > https://github.com/schwern/Scalar-Util-Numeric/ You're an admin.
Cool! Thanks. Show quoted text
> Let me know if there's a real repo somewhere.
Nope. I usually find myself forking your gitpan uploads (for which a thousand thanks) when gitifying my (and other people's) CPAN stuff.