Skip to content

Commit b51608b

Browse files
committed
cpan/Scalar-List-Utils - Update to version 1.68
1.68 -- 2024-10-18 [CHANGES] * Added (empty) Scalar::List::Utils module so that a module exists which matches the name of the distribution (GH #135)
1 parent cb5f3d4 commit b51608b

File tree

10 files changed

+77
-11
lines changed

10 files changed

+77
-11
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,6 +2213,7 @@ cpan/podlators/t/text/termcap.t podlators test
22132213
cpan/podlators/t/text/utf8-io.t Test file related to podlators
22142214
cpan/Scalar-List-Utils/lib/List/Util.pm List::Util
22152215
cpan/Scalar-List-Utils/lib/List/Util/XS.pm List::Util
2216+
cpan/Scalar-List-Utils/lib/Scalar/List/Utils.pm Scalar-List-Utils
22162217
cpan/Scalar-List-Utils/lib/Scalar/Util.pm Scalar::Util
22172218
cpan/Scalar-List-Utils/lib/Sub/Util.pm Module related to Scalar::Util
22182219
cpan/Scalar-List-Utils/ListUtil.xs Util extension

Porting/Maintainers.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,8 @@ package Maintainers;
999999
},
10001000

10011001
'Scalar::Util' => {
1002-
'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.66.tar.gz',
1003-
'SYNCINFO' => 'tib on Fri Sep 20 08:05:21 2024',
1002+
'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.68.tar.gz',
1003+
'SYNCINFO' => 'rich on Sun Oct 20 15:42:58 2024',
10041004
'FILES' => q[cpan/Scalar-List-Utils],
10051005
},
10061006

cpan/Scalar-List-Utils/ListUtil.xs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,8 @@ PPCODE:
16051605
AV *av;
16061606

16071607
if(!SvROK(arg) || SvTYPE(SvRV(arg)) != SVt_PVAV)
1608-
croak("Expected an ARRAY reference to zip");
1608+
croak("Expected an ARRAY reference to %s",
1609+
is_mesh ? "mesh" : "zip");
16091610
av = lists[i] = (AV *)SvRV(arg);
16101611

16111612
if(!i) {
@@ -1640,7 +1641,7 @@ PPCODE:
16401641
AvARRAY(lists[listi])[i] :
16411642
&PL_sv_undef;
16421643

1643-
mPUSHs(SvREFCNT_inc(item));
1644+
mPUSHs(newSVsv(item));
16441645
}
16451646
}
16461647

@@ -1659,7 +1660,7 @@ PPCODE:
16591660
AvARRAY(lists[listi])[i] :
16601661
&PL_sv_undef;
16611662

1662-
av_push(ret, SvREFCNT_inc(item));
1663+
av_push(ret, newSVsv(item));
16631664
}
16641665

16651666
mPUSHs(newRV_noinc((SV *)ret));

cpan/Scalar-List-Utils/lib/List/Util.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ our @EXPORT_OK = qw(
1616
sample shuffle uniq uniqint uniqnum uniqstr zip zip_longest zip_shortest mesh mesh_longest mesh_shortest
1717
head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
1818
);
19-
our $VERSION = "1.66";
19+
our $VERSION = "1.68";
2020
our $XS_VERSION = $VERSION;
2121
$VERSION =~ tr/_//d;
2222

cpan/Scalar-List-Utils/lib/List/Util/XS.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use strict;
33
use warnings;
44
use List::Util;
55

6-
our $VERSION = "1.66"; # FIXUP
6+
our $VERSION = "1.68"; # FIXUP
77
$VERSION =~ tr/_//d; # FIXUP
88

99
1;
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package Scalar::List::Utils;
2+
use strict;
3+
use warnings;
4+
5+
our $VERSION = "1.68";
6+
$VERSION =~ tr/_//d;
7+
8+
1;
9+
10+
__END__
11+
12+
=head1 NAME
13+
14+
Scalar::List::Utils - A distribution of general-utility subroutines
15+
16+
=head1 SYNOPSIS
17+
18+
use Scalar::Util qw(blessed);
19+
use List::Util qw(any);
20+
21+
=head1 DESCRIPTION
22+
23+
C<Scalar::List::Utils> does nothing on its own. It is packaged with several
24+
useful modules.
25+
26+
=head1 MODULES
27+
28+
=head2 L<List::Util>
29+
30+
L<List::Util> contains a selection of useful subroutines for operating on lists
31+
of values.
32+
33+
=head2 L<Scalar::Util>
34+
35+
L<Scalar::Util> contains a selection of useful subroutines for interrogating
36+
or manipulating scalar values.
37+
38+
=head2 L<Sub::Util>
39+
40+
L<Sub::Util> contains a selection of useful subroutines for interrogating
41+
or manipulating subroutine references.
42+
43+
=cut

cpan/Scalar-List-Utils/lib/Scalar/Util.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ our @EXPORT_OK = qw(
1717
dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
1818
tainted
1919
);
20-
our $VERSION = "1.66";
20+
our $VERSION = "1.68";
2121
$VERSION =~ tr/_//d;
2222

2323
require List::Util; # List::Util loads the XS

cpan/Scalar-List-Utils/lib/Sub/Util.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ our @EXPORT_OK = qw(
1515
subname set_subname
1616
);
1717

18-
our $VERSION = "1.66";
18+
our $VERSION = "1.68";
1919
$VERSION =~ tr/_//d;
2020

2121
require List::Util; # as it has the XS

cpan/Scalar-List-Utils/t/mesh.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use strict;
44
use warnings;
55

6-
use Test::More tests => 7;
6+
use Test::More tests => 8;
77
use List::Util qw(mesh mesh_longest mesh_shortest);
88

99
is_deeply( [mesh ()], [],
@@ -29,3 +29,13 @@ ok( !defined eval { mesh 1, 2, 3 },
2929

3030
ok( !defined eval { mesh +{ one => 1 } },
3131
'reference to non array throws exception' );
32+
33+
# related to RT156183
34+
{
35+
my @inp = ( [1,2,3], [4,5,6] );
36+
foreach my $x ( mesh @inp ) {
37+
$x++;
38+
}
39+
is_deeply( \@inp, [ [1,2,3], [4,5,6] ],
40+
'original values unchanged by modification of mesh() output' );
41+
}

cpan/Scalar-List-Utils/t/zip.t

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use strict;
44
use warnings;
55

6-
use Test::More tests => 7;
6+
use Test::More tests => 8;
77
use List::Util qw(zip zip_longest zip_shortest);
88

99
is_deeply( [zip ()], [],
@@ -29,3 +29,14 @@ ok( !defined eval { zip 1, 2, 3 },
2929

3030
ok( !defined eval { zip +{ one => 1 } },
3131
'reference to non array throws exception' );
32+
33+
# RT156183
34+
{
35+
my @inp = ( [1,2,3], [4,5,6] );
36+
foreach my $pair ( zip @inp ) {
37+
$pair->[0]++;
38+
$pair->[1]++;
39+
}
40+
is_deeply( \@inp, [ [1,2,3], [4,5,6] ],
41+
'original values unchanged by modification of zip() output' );
42+
}

0 commit comments

Comments
 (0)