diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 9842741cc750..1fe22ba8fdf2 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -959,17 +959,8 @@ package Maintainers; }, 'Scalar-List-Utils' => { - 'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.46.tar.gz', + 'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.47.tar.gz', 'FILES' => q[cpan/Scalar-List-Utils], - 'CUSTOMIZED' => [ - 'lib/List/Util.pm', # CPAN RT 118470 - 'lib/List/Util/XS.pm', # CPAN RT 118470 - 'lib/Scalar/Util.pm', # CPAN RT 118470 - 'lib/Sub/Util.pm', # CPAN RT 118470 - 't/lln.t', # CPAN RT 118470 - 't/uniq.t', # CPAN RT 118470 - 't/tainted.t', # CPAN RT 119169 - ], }, 'Search::Dict' => { diff --git a/cpan/Scalar-List-Utils/ListUtil.xs b/cpan/Scalar-List-Utils/ListUtil.xs index 79e74d9302d4..9db38045f93e 100644 --- a/cpan/Scalar-List-Utils/ListUtil.xs +++ b/cpan/Scalar-List-Utils/ListUtil.xs @@ -7,14 +7,33 @@ #include #include -#define NEED_sv_2pv_flags 1 -#include "ppport.h" +#ifdef USE_PPPORT_H +# define NEED_sv_2pv_flags 1 +# define NEED_newSVpvn_flags 1 +# include "ppport.h" +#endif + +#ifndef PERL_VERSION_DECIMAL +# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) +#endif +#ifndef PERL_DECIMAL_VERSION +# define PERL_DECIMAL_VERSION \ + PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) +#endif +#ifndef PERL_VERSION_GE +# define PERL_VERSION_GE(r,v,s) \ + (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) +#endif +#ifndef PERL_VERSION_LE +# define PERL_VERSION_LE(r,v,s) \ + (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) +#endif -#if PERL_BCDVERSION >= 0x5006000 +#if PERL_VERSION_GE(5,6,0) # include "multicall.h" #endif -#if PERL_BCDVERSION < 0x5023008 +#if !PERL_VERSION_GE(5,23,8) # define UNUSED_VAR_newsp PERL_UNUSED_VAR(newsp) #else # define UNUSED_VAR_newsp NOOP @@ -28,7 +47,7 @@ was not exported. Therefore platforms like win32, VMS etc have problems so we redefine it here -- GMB */ -#if PERL_BCDVERSION < 0x5007000 +#if !PERL_VERSION_GE(5,7,0) /* Not in 5.6.1. */ # ifdef cxinc # undef cxinc @@ -879,7 +898,7 @@ PPCODE: /* This MULTICALL-based code appears to fail on perl 5.10.0 and 5.8.9 * Skip it on those versions (RT#87857) */ -#if defined(dMULTICALL) && (PERL_BCDVERSION > 0x5010000 || PERL_BCDVERSION < 0x5008009) +#if defined(dMULTICALL) && (PERL_VERSION_GE(5,10,1) || PERL_VERSION_LE(5,8,8)) assert(cv); if(!CvISXSUB(cv)) { /* Since MULTICALL is about to move it */ @@ -1056,11 +1075,11 @@ CODE: arg = sv_mortalcopy(arg); if(SvUOK(arg)) - sv_setpvf(keysv, "%"UVuf, SvUV(arg)); + sv_setpvf(keysv, "%" UVuf, SvUV(arg)); else if(SvIOK(arg)) - sv_setpvf(keysv, "%"IVdf, SvIV(arg)); + sv_setpvf(keysv, "%" IVdf, SvIV(arg)); else - sv_setpvf(keysv, "%"NVgf, SvNV(arg)); + sv_setpvf(keysv, "%" NVgf, SvNV(arg)); #ifdef HV_FETCH_EMPTY_HE he = (HE*) hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); if (HeVAL(he)) @@ -1329,7 +1348,7 @@ CODE: if(SvAMAGIC(sv) && (tempsv = AMG_CALLun(sv, numer))) { sv = tempsv; } -#if PERL_BCDVERSION < 0x5008005 +#if !PERL_VERSION_GE(5,8,5) if(SvPOK(sv) || SvPOKp(sv)) { RETVAL = looks_like_number(sv) ? &PL_sv_yes : &PL_sv_no; } diff --git a/cpan/Scalar-List-Utils/Makefile.PL b/cpan/Scalar-List-Utils/Makefile.PL index 247b3b7d9d76..9859730e7526 100644 --- a/cpan/Scalar-List-Utils/Makefile.PL +++ b/cpan/Scalar-List-Utils/Makefile.PL @@ -11,7 +11,7 @@ WriteMakefile( NAME => q[List::Util], ABSTRACT => q[Common Scalar and List utility subroutines], AUTHOR => q[Graham Barr ], - DEFINE => q[-DPERL_EXT], + DEFINE => ($ENV{PERL_CORE} ? q[-DPERL_EXT] : q[-DPERL_EXT -DUSE_PPPORT_H]), DISTNAME => q[Scalar-List-Utils], VERSION_FROM => 'lib/List/Util.pm', diff --git a/cpan/Scalar-List-Utils/lib/List/Util.pm b/cpan/Scalar-List-Utils/lib/List/Util.pm index 23473fc627bb..47324ca065d2 100644 --- a/cpan/Scalar-List-Utils/lib/List/Util.pm +++ b/cpan/Scalar-List-Utils/lib/List/Util.pm @@ -15,7 +15,7 @@ our @EXPORT_OK = qw( all any first min max minstr maxstr none notall product reduce sum sum0 shuffle uniq uniqnum uniqstr pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst ); -our $VERSION = "1.46_02"; +our $VERSION = "1.47"; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/cpan/Scalar-List-Utils/lib/List/Util/XS.pm b/cpan/Scalar-List-Utils/lib/List/Util/XS.pm index 783499c35f6a..a9e191fc006e 100644 --- a/cpan/Scalar-List-Utils/lib/List/Util/XS.pm +++ b/cpan/Scalar-List-Utils/lib/List/Util/XS.pm @@ -3,7 +3,7 @@ use strict; use warnings; use List::Util; -our $VERSION = "1.46_02"; # FIXUP +our $VERSION = "1.47"; # FIXUP $VERSION = eval $VERSION; # FIXUP 1; diff --git a/cpan/Scalar-List-Utils/lib/Scalar/Util.pm b/cpan/Scalar-List-Utils/lib/Scalar/Util.pm index bb0f780b554f..bd2b9ff80246 100644 --- a/cpan/Scalar-List-Utils/lib/Scalar/Util.pm +++ b/cpan/Scalar-List-Utils/lib/Scalar/Util.pm @@ -17,7 +17,7 @@ our @EXPORT_OK = qw( dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted ); -our $VERSION = "1.46_02"; +our $VERSION = "1.47"; $VERSION = eval $VERSION; require List::Util; # List::Util loads the XS diff --git a/cpan/Scalar-List-Utils/lib/Sub/Util.pm b/cpan/Scalar-List-Utils/lib/Sub/Util.pm index 28888f826550..48f775fadb6a 100644 --- a/cpan/Scalar-List-Utils/lib/Sub/Util.pm +++ b/cpan/Scalar-List-Utils/lib/Sub/Util.pm @@ -15,7 +15,7 @@ our @EXPORT_OK = qw( subname set_subname ); -our $VERSION = "1.46_02"; +our $VERSION = "1.47"; $VERSION = eval $VERSION; require List::Util; # as it has the XS diff --git a/cpan/Scalar-List-Utils/t/lln.t b/cpan/Scalar-List-Utils/t/lln.t index be928e462b8b..df9ea3aea93b 100644 --- a/cpan/Scalar-List-Utils/t/lln.t +++ b/cpan/Scalar-List-Utils/t/lln.t @@ -10,13 +10,9 @@ foreach my $num (qw(1 -1 +1 1.0 +1.0 -1.0 -1.0e-12)) { ok(looks_like_number($num), "'$num'"); } -SKIP: { - my $vax_float = (pack("d",1) =~ /^[\x80\x10]\x40/); - skip("VAX does not have inf/nan", 3) if $vax_float; - is(!!looks_like_number("Inf"), $] >= 5.006001, 'Inf'); - is(!!looks_like_number("Infinity"), $] >= 5.008, 'Infinity'); - is(!!looks_like_number("NaN"), $] >= 5.008, 'NaN'); -} +is(!!looks_like_number("Inf"), $] >= 5.006001, 'Inf'); +is(!!looks_like_number("Infinity"), $] >= 5.008, 'Infinity'); +is(!!looks_like_number("NaN"), $] >= 5.008, 'NaN'); is(!!looks_like_number("foo"), '', 'foo'); is(!!looks_like_number(undef), '', 'undef'); is(!!looks_like_number({}), '', 'HASH Ref'); diff --git a/cpan/Scalar-List-Utils/t/uniq.t b/cpan/Scalar-List-Utils/t/uniq.t index 354b2137ac43..5a6925d1f589 100644 --- a/cpan/Scalar-List-Utils/t/uniq.t +++ b/cpan/Scalar-List-Utils/t/uniq.t @@ -70,19 +70,14 @@ is_deeply( [ uniqnum qw( 1 1.1 1.2 1.3 ) ], [ 1, 1.1, 1.2, 1.3 ], 'uniqnum distinguishes floats' ); -SKIP: { -my $vax_float = (pack("d",1) =~ /^[\x80\x10]\x40/); -skip("VAX does not have inf/nan", 1) if $vax_float; - # Hard to know for sure what an Inf is going to be. Lets make one -my $Inf = 0 + eval '1E1000'; +my $Inf = 0 + 1E1000; my $NaN; $Inf **= 1000 while ( $NaN = $Inf - $Inf ) == $NaN; is_deeply( [ uniqnum 0, 1, 12345, $Inf, -$Inf, $NaN, 0, $Inf, $NaN ], [ 0, 1, 12345, $Inf, -$Inf, $NaN ], 'uniqnum preserves the special values of +-Inf and Nan' ); -} { my $maxint = ~0; diff --git a/t/porting/customized.dat b/t/porting/customized.dat index 3be683b31414..e7a3ea6e5575 100644 --- a/t/porting/customized.dat +++ b/t/porting/customized.dat @@ -14,13 +14,6 @@ Pod::Checker cpan/Pod-Checker/t/pod/contains_bad_pod.xr 73538fd80dfe6e19ad561fe0 Pod::Checker cpan/Pod-Checker/t/pod/selfcheck.t 8ce3cfd38e4b9bcf5bc7fe7f2a14195e49aed7d8 Pod::Checker cpan/Pod-Checker/t/pod/testcmp.pl a0cd5c8eca775c7753f4464eee96fa916e3d8a16 Pod::Checker cpan/Pod-Checker/t/pod/testpchk.pl b2072c7f4379fd050e15424175d7cac5facf5b3b -Scalar-List-Utils cpan/Scalar-List-Utils/lib/List/Util.pm 8cbd3463af838b4a39a7077bea3fe758a71f8ec3 -Scalar-List-Utils cpan/Scalar-List-Utils/lib/List/Util/XS.pm 2d09b84a5575e67834655a0e9b3569c83d9a3902 -Scalar-List-Utils cpan/Scalar-List-Utils/lib/Scalar/Util.pm 98af8fe390d9c9fa11a1fafebbc68ea663cdce2c -Scalar-List-Utils cpan/Scalar-List-Utils/lib/Sub/Util.pm 188cf0dd95cd7ba60fd6a366f440811fb52c2c79 -Scalar-List-Utils cpan/Scalar-List-Utils/t/lln.t b7148c7f1cd9c70fd21d8153542b6d3de2b655ad -Scalar-List-Utils cpan/Scalar-List-Utils/t/tainted.t 9c52e04687ec8a7d23a1c38a762723858305b1fe -Scalar-List-Utils cpan/Scalar-List-Utils/t/uniq.t 5de01094d2bca9cf8b2bbbca920122f7396bf11e Socket cpan/Socket/Socket.pm 98e38176d745c38282907f391c077298f5a3d0ba Socket cpan/Socket/Socket.xs edd4fed212785f11c5c2095a75941dad27d586d9 Test::Harness cpan/Test-Harness/bin/prove 9b2866928cb1125de2c68f9773b25723e02c54c0