Skip Menu |
 

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

Report information
The Basics
Id: 94806
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

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

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



Subject: looks_like_number exposes internal details inappropriately
It should instead return a boolean. see https://rt.cpan.org/Ticket/Display.html?id=94805
Download (untitled) / with headers
text/plain 165b
On Wed Apr 16 15:11:24 2014, ETHER wrote: Show quoted text
> It should instead return a boolean. see > https://rt.cpan.org/Ticket/Display.html?id=94805
Seems good. -- Paul Evans
Subject: rt94806.patch
Download rt94806.patch
text/x-diff 499b
diff --git a/ListUtil.xs b/ListUtil.xs index 5d66ee0..84be2f1 100644 --- a/ListUtil.xs +++ b/ListUtil.xs @@ -1076,13 +1076,13 @@ CODE: } #if PERL_BCDVERSION < 0x5008005 if(SvPOK(sv) || SvPOKp(sv)) { - RETVAL = looks_like_number(sv); + RETVAL = !!looks_like_number(sv); } else { RETVAL = SvFLAGS(sv) & (SVf_NOK|SVp_NOK|SVf_IOK|SVp_IOK); } #else - RETVAL = looks_like_number(sv); + RETVAL = !!looks_like_number(sv); #endif OUTPUT: RETVAL
Released in 1.39 -- Paul Evans


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.