Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 2629
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: DANKOGAI [...] cpan.org
Requestors: marek.rouchal [...] infineon.com
Cc:
AdminCc:

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



Subject: Wrong assumption in numeric comparison
Download (untitled) / with headers
text/plain 449b
On my perl-5.8.0 (ithreads, shared libperl) on Solaris/Sparc 2.7 I see the following warning in the test (Encode-1.95!!!): t/enc_utf8.......Argument "" isn't numeric in numeric eq (==) at /home/hwadm/.cpan/build/Encode-1.95/blib/lib/encoding.pm line 30. This is because $Config{perl_patchevel} yields '' rather than 0. This should be changed, e.g. like this: $Config{perl_patchlevel} ? ... : ... as '' and 0 are equally "false". Regards, Marek
Date: Thu, 22 May 2003 18:46:40 +0900
Subject: Re: [cpan #2629] Wrong assumption in numeric comparison
CC: bug-Encode [...] rt.cpan.org, perl5-porters [...] perl.org
To: MAREKR [...] cpan.org
From: Dan Kogai <dankogai [...] dan.co.jp>
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.5k
On Thursday, May 22, 2003, at 06:30 PM, via RT wrote: Show quoted text
> > This message about Encode was sent to you by MAREKR <MAREKR@cpan.org> > via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=2629 > > > On my perl-5.8.0 (ithreads, shared libperl) on Solaris/Sparc 2.7 > I see the following warning in the test (Encode-1.95!!!): > > t/enc_utf8.......Argument "" isn't numeric in numeric eq (==) at > /home/hwadm/.cpan/build/Encode-1.95/blib/lib/encoding.pm line 30. > > This is because $Config{perl_patchevel} yields '' rather than 0. > This should be changed, e.g. like this: > $Config{perl_patchlevel} ? ... : ... > as '' and 0 are equally "false". > > Regards, > > Marek
Thanks for the report. The patch below should fix it. Dan the Encode Maintainer =================================================================== RCS file: encoding.pm,v retrieving revision 1.44 diff -u -r1.44 encoding.pm --- encoding.pm 2003/03/09 20:07:37 1.44 +++ encoding.pm 2003/05/22 09:45:16 @@ -1,4 +1,4 @@ -# $Id: encoding.pm,v 1.44 2003/03/09 20:07:37 dankogai Exp dankogai $ +# $Id: encoding.pm,v 1.44 2003/03/09 20:07:37 dankogai Exp $ package encoding; our $VERSION = do { my @r = (q$Revision: 1.44 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; @@ -27,7 +27,7 @@ UTF-32 UTF-32BE UTF-32LE); $utfs{$name} or return 0; # UTFs or no require Config; Config->import(); our %Config; - return $Config{perl_patchlevel} == 0 # maintperl then no + return $Config{perl_patchlevel} ? 0 : 1 # maintperl then no } sub import {
From: marek.rouchal [...] infineon.com
To: dankogai [...] dan.co.jp
CC: bug-Encode [...] rt.cpan.org
Subject: Re: [cpan #2629] Wrong assumption in numeric comparison
Date: Thu, 22 May 2003 11:56:48 +0200
RT-Send-Cc:
Download (untitled) / with headers
text/plain 129b
Thanks, that was quick! Not urgent for me, just include it in the next regular update of Encode. Keep up the good work! -Marek


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.