From ad434879973009b368013b6390fb5691800a87bb Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Sun, 1 Sep 2013 14:57:33 +0100 Subject: [PATCH] Upgrade Scalar-List-Utils from version 1.31 to 1.32 --- Porting/Maintainers.pl | 2 +- cpan/List-Util/Changes | 7 +++++++ cpan/List-Util/ListUtil.xs | 5 ++++- cpan/List-Util/lib/List/Util.pm | 2 +- cpan/List-Util/lib/List/Util/XS.pm | 2 +- cpan/List-Util/lib/Scalar/Util.pm | 36 ++++++++++++++++++------------------ cpan/List-Util/t/readonly.t | 4 +++- pod/perldelta.pod | 6 ++++++ 8 files changed, 41 insertions(+), 23 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 1bc5dea..a614033 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1546,7 +1546,7 @@ use File::Glob qw(:case); 'Scalar-List-Utils' => { 'MAINTAINER' => 'gbarr', - 'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.31.tar.gz', + 'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.32.tar.gz', 'FILES' => q[cpan/List-Util], 'EXCLUDED' => [ qr{^inc/Module/}, diff --git a/cpan/List-Util/Changes b/cpan/List-Util/Changes index d7088a1..2c26c70 100644 --- a/cpan/List-Util/Changes +++ b/cpan/List-Util/Changes @@ -1,3 +1,10 @@ +1.32 -- Sun Aug 31 23:48 UTC 2013 + + * Skip pairmap()'s MULTICALL implementation 5.8.9 / 5.10.0 as it doesn't + work (RT87857) + * Comment on the fact that package "0" is defined but false (RT88201) + * TODO test in t/readonly.t now passes since 5.19.3 (RT88223) + 1.31 -- Wed Aug 14 20:38 UTC 2013 * Bugfix pairmap to return list length in scalar context diff --git a/cpan/List-Util/ListUtil.xs b/cpan/List-Util/ListUtil.xs index 7448a8f..c89bd57 100644 --- a/cpan/List-Util/ListUtil.xs +++ b/cpan/List-Util/ListUtil.xs @@ -529,7 +529,10 @@ PPCODE: bgv = gv_fetchpv("b", GV_ADD, SVt_PV); SAVESPTR(GvSV(agv)); SAVESPTR(GvSV(bgv)); -#ifdef dMULTICALL +/* 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(!CvISXSUB(cv)) { // Since MULTICALL is about to move it SV **stack = PL_stack_base + ax; diff --git a/cpan/List-Util/lib/List/Util.pm b/cpan/List-Util/lib/List/Util.pm index f01bff2..042ef14 100644 --- a/cpan/List-Util/lib/List/Util.pm +++ b/cpan/List-Util/lib/List/Util.pm @@ -13,7 +13,7 @@ require Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = qw(first min max minstr maxstr reduce sum sum0 shuffle pairmap pairgrep pairfirst pairs pairkeys pairvalues); -our $VERSION = "1.31"; +our $VERSION = "1.32"; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/cpan/List-Util/lib/List/Util/XS.pm b/cpan/List-Util/lib/List/Util/XS.pm index bb38ab2..d9916bd 100644 --- a/cpan/List-Util/lib/List/Util/XS.pm +++ b/cpan/List-Util/lib/List/Util/XS.pm @@ -2,7 +2,7 @@ package List::Util::XS; use strict; use List::Util; -our $VERSION = "1.31"; # FIXUP +our $VERSION = "1.32"; # FIXUP $VERSION = eval $VERSION; # FIXUP 1; diff --git a/cpan/List-Util/lib/Scalar/Util.pm b/cpan/List-Util/lib/Scalar/Util.pm index d10bbaa..7101c98 100644 --- a/cpan/List-Util/lib/Scalar/Util.pm +++ b/cpan/List-Util/lib/Scalar/Util.pm @@ -26,7 +26,7 @@ our @EXPORT_OK = qw( tainted weaken ); -our $VERSION = "1.31"; +our $VERSION = "1.32"; $VERSION = eval $VERSION; our @EXPORT_FAIL; @@ -80,9 +80,7 @@ so small such that being individual extensions would be wasteful. By default C does not export any subroutines. The subroutines defined are -=over 4 - -=item blessed EXPR +=head2 blessed EXPR If EXPR evaluates to a blessed reference the name of the package that it is blessed into is returned. Otherwise C is returned. @@ -96,7 +94,11 @@ that it is blessed into is returned. Otherwise C is returned. $obj = bless [], "Foo"; $class = blessed $obj; # "Foo" -=item dualvar NUM, STRING +Take care when using this function simply as a truth test (such as in +C) because the package name C<"0"> is defined yet +false. + +=head2 dualvar NUM, STRING Returns a scalar that has the value NUM in a numeric context and the value STRING in a string context. @@ -105,7 +107,7 @@ value STRING in a string context. $num = $foo + 2; # 12 $str = $foo . " world"; # Hello world -=item isdual EXPR +=head2 isdual EXPR If EXPR is a scalar that is a dualvar, the result is true. @@ -132,7 +134,7 @@ You can capture its numeric and string content using: $err = dualvar $!, $!; $dual = isdual($err); # true -=item isvstring EXPR +=head2 isvstring EXPR If EXPR is a scalar which was coded as a vstring the result is true. @@ -140,12 +142,12 @@ If EXPR is a scalar which was coded as a vstring the result is true. $fmt = isvstring($vs) ? "%vd" : "%s"; #true printf($fmt,$vs); -=item looks_like_number EXPR +=head2 looks_like_number EXPR Returns true if perl thinks EXPR is a number. See L. -=item openhandle FH +=head2 openhandle FH Returns FH if FH may be used as a filehandle and is open, or FH is a tied handle. Otherwise C is returned. @@ -155,7 +157,7 @@ handle. Otherwise C is returned. $fh = openhandle(*NOTOPEN); # undef $fh = openhandle("scalar"); # undef -=item readonly SCALAR +=head2 readonly SCALAR Returns true if SCALAR is readonly. @@ -164,7 +166,7 @@ Returns true if SCALAR is readonly. $readonly = foo($bar); # false $readonly = foo(0); # true -=item refaddr EXPR +=head2 refaddr EXPR If EXPR evaluates to a reference the internal memory address of the referenced value is returned. Otherwise C is returned. @@ -176,7 +178,7 @@ the referenced value is returned. Otherwise C is returned. $obj = bless {}, "Foo"; $addr = refaddr $obj; # eg 88123488 -=item reftype EXPR +=head2 reftype EXPR If EXPR evaluates to a reference the type of the variable referenced is returned. Otherwise C is returned. @@ -188,21 +190,21 @@ is returned. Otherwise C is returned. $obj = bless {}, "Foo"; $type = reftype $obj; # HASH -=item set_prototype CODEREF, PROTOTYPE +=head2 set_prototype CODEREF, PROTOTYPE Sets the prototype of the given function, or deletes it if PROTOTYPE is undef. Returns the CODEREF. set_prototype \&foo, '$$'; -=item tainted EXPR +=head2 tainted EXPR Return true if the result of EXPR is tainted $taint = tainted("constant"); # false $taint = tainted($ENV{PWD}); # true if running under -T -=item weaken REF +=head2 weaken REF REF will be turned into a weak reference. This means that it will not hold a reference count on the object it references. Also when the reference @@ -237,7 +239,7 @@ references to objects will be strong, causing the remaining objects to never be destroyed because there is now always a strong reference to them in the @object array. -=item isweak EXPR +=head2 isweak EXPR If EXPR is a scalar which is a weak reference the result is true. @@ -251,8 +253,6 @@ B: Copying a weak reference creates a normal, strong, reference. $copy = $ref; $weak = isweak($copy); # false -=back - =head1 DIAGNOSTICS Module use may give one of the following errors during import. diff --git a/cpan/List-Util/t/readonly.t b/cpan/List-Util/t/readonly.t index 42ed3d8..91385fd 100644 --- a/cpan/List-Util/t/readonly.t +++ b/cpan/List-Util/t/readonly.t @@ -45,7 +45,9 @@ sub try $var = 123; { - local $TODO = $Config::Config{useithreads} ? "doesn't work with threads" : undef; + # This used not to work with ithreads, but seems to be working since 5.19.3 + local $TODO = ( $Config::Config{useithreads} && $] < 5.019003 ) ? + "doesn't work with threads" : undef; ok( try ("abc"), 'reference a constant in a sub'); } ok( !try ($var), 'reference a non-constant in a sub'); diff --git a/pod/perldelta.pod b/pod/perldelta.pod index f3459d8..7f4fd18 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -230,6 +230,12 @@ nonexistent array elements. =item * +L and L have been upgraded from version 1.31 to 1.32. + +TODO + +=item * + L has been upgraded from version 1.9992 to 1.9993. Cleaned up the L and L documentation to -- 2.7.4