Skip to content

cpan/Scalar-List-Utils - Re-Update to version 1.69 #23433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions Porting/Maintainers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1010,16 +1010,8 @@ package Maintainers;

'Scalar::Util' => {
'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.69.tar.gz',
'SYNCINFO' => 'jkeenan on Thu Apr 10 21:01:49 2025',
'SYNCINFO' => 'jkeenan on Fri Jul 11 19:22:58 2025',
'FILES' => q[cpan/Scalar-List-Utils],
'CUSTOMIZED' => [
'ListUtil.xs',
'lib/List/Util.pm',
'lib/List/Util/XS.pm',
'lib/Scalar/Util.pm',
'lib/Sub/Util.pm',
't/exotic_names.t'
],
},

'Search::Dict' => {
Expand Down
23 changes: 10 additions & 13 deletions cpan/Scalar-List-Utils/ListUtil.xs
Original file line number Diff line number Diff line change
Expand Up @@ -1852,10 +1852,10 @@ CODE:
#ifdef SvVOK
SvGETMAGIC(sv);
ST(0) = boolSV(SvVOK(sv));
XSRETURN(1);
#else
croak("vstrings are not implemented in this release of perl");
ST(0) = boolSV(0);
#endif
XSRETURN(1);

SV *
looks_like_number(sv)
Expand Down Expand Up @@ -1951,8 +1951,10 @@ PREINIT:
STRLEN namelen;
const char* nameptr = SvPV(name, namelen);
int utf8flag = SvUTF8(name);
#if PERL_VERSION_LT(5, 41, 3)
int quotes_seen = 0;
bool need_subst = FALSE;
#endif
PPCODE:
if (!SvROK(sub) && SvGMAGICAL(sub))
mg_get(sub);
Expand All @@ -1975,18 +1977,23 @@ PPCODE:
if (s > nameptr && *s == ':' && s[-1] == ':') {
end = s - 1;
begin = ++s;
#if PERL_VERSION_LT(5, 41, 3)
if (quotes_seen)
need_subst = TRUE;
#endif
}
#if PERL_VERSION_LT(5, 41, 3)
else if (s > nameptr && *s != '\0' && s[-1] == '\'') {
end = s - 1;
begin = s;
if (quotes_seen++)
need_subst = TRUE;
}
#endif
}
s--;
if (end) {
#if PERL_VERSION_LT(5, 41, 3)
SV* tmp;
if (need_subst) {
STRLEN length = end - nameptr + quotes_seen - (*end == '\'' ? 1 : 0);
Expand All @@ -2006,6 +2013,7 @@ PPCODE:
stash = gv_stashpvn(left, length, GV_ADD | utf8flag);
}
else
#endif
stash = gv_stashpvn(nameptr, end - nameptr, GV_ADD | utf8flag);
nameptr = begin;
namelen -= begin - nameptr;
Expand Down Expand Up @@ -2101,20 +2109,9 @@ BOOT:
HV *lu_stash = gv_stashpvn("List::Util", 10, TRUE);
GV *rmcgv = *(GV**)hv_fetch(lu_stash, "REAL_MULTICALL", 14, TRUE);
SV *rmcsv;
#if !defined(SvVOK)
HV *su_stash = gv_stashpvn("Scalar::Util", 12, TRUE);
GV *vargv = *(GV**)hv_fetch(su_stash, "EXPORT_FAIL", 11, TRUE);
AV *varav;
if(SvTYPE(vargv) != SVt_PVGV)
gv_init(vargv, su_stash, "Scalar::Util", 12, TRUE);
varav = GvAVn(vargv);
#endif
if(SvTYPE(rmcgv) != SVt_PVGV)
gv_init(rmcgv, lu_stash, "List::Util", 10, TRUE);
rmcsv = GvSVn(rmcgv);
#ifndef SvVOK
av_push(varav, newSVpv("isvstring",9));
#endif
#ifdef REAL_MULTICALL
sv_setsv(rmcsv, &PL_sv_yes);
#else
Expand Down
2 changes: 1 addition & 1 deletion cpan/Scalar-List-Utils/lib/List/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ our @EXPORT_OK = qw(
sample shuffle uniq uniqint uniqnum uniqstr zip zip_longest zip_shortest mesh mesh_longest mesh_shortest
head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
);
our $VERSION = "1.68_01";
our $VERSION = "1.69";
our $XS_VERSION = $VERSION;
$VERSION =~ tr/_//d;

Expand Down
2 changes: 1 addition & 1 deletion cpan/Scalar-List-Utils/lib/List/Util/XS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use strict;
use warnings;
use List::Util;

our $VERSION = "1.68_01"; # FIXUP
our $VERSION = "1.69"; # FIXUP
$VERSION =~ tr/_//d; # FIXUP

1;
Expand Down
12 changes: 1 addition & 11 deletions cpan/Scalar-List-Utils/lib/Scalar/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ our @EXPORT_OK = qw(
dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
tainted
);
our $VERSION = "1.68_01";
our $VERSION = "1.69";
$VERSION =~ tr/_//d;

require List::Util; # List::Util loads the XS
Expand All @@ -36,16 +36,6 @@ if( $] >= 5.040 ) {
*isweak = \&{ $builtins->{is_weak} }; # renamed
}

# populating @EXPORT_FAIL is done in the XS code
sub export_fail {
if (grep { /^isvstring$/ } @_ ) {
require Carp;
Carp::croak("Vstrings are not implemented in this version of perl");
}

@_;
}

# set_prototype has been moved to Sub::Util with a different interface
sub set_prototype(&$)
{
Expand Down
2 changes: 1 addition & 1 deletion cpan/Scalar-List-Utils/lib/Sub/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ our @EXPORT_OK = qw(
subname set_subname
);

our $VERSION = "1.68_01";
our $VERSION = "1.69";
$VERSION =~ tr/_//d;

require List::Util; # as it has the XS
Expand Down
6 changes: 3 additions & 3 deletions cpan/Scalar-List-Utils/t/exotic_names.t
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sub caller3_ok {
),
);

$expected =~ s/'/::/g if $] < 5.037009 || $] >= 5.041_004;
$expected =~ s/'/::/g if $] < 5.041_003;

# this is apparently how things worked before 5.16
utf8::encode($expected) if $] < 5.016 and $ord > 255;
Expand All @@ -72,7 +72,7 @@ my @ordinal = (
($] >= 5.014 ? ( 0 ) : ()),
1 .. 38,
# single quote ' separators are deprecated in 5.37.9
($] < 5.037009 || $] >= 5.041_004 ? ( 39 ) : ()),
($] < 5.037009 ? ( 39 ) : ()),
40 .. 255,
# Unicode in 5.6 is not sane (crashes etc)
($] >= 5.008 ? (
Expand All @@ -85,7 +85,7 @@ my @ordinal = (

my $legal_ident_char = join('',
"A-Z_a-z0-9",
($] < 5.037009 || $] >= 5.041_004 ? q['] : ()),
($] < 5.037009 ? q['] : ()),
($] > 5.008 ? (
map chr, 0x100, 0x498
) : ()),
Expand Down
Loading