diff options
author | Karl Berry <karl@freefriends.org> | 2014-04-23 21:46:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-04-23 21:46:20 +0000 |
commit | 300c1eb6d37d46078d448d6d58938d5a80cd68ff (patch) | |
tree | 23a0a8b9f8f5460b405119c4d3c163d2d488ca5e /Master/tlpkg/tlperl/lib/List | |
parent | ed55d86b7c5e18f6eccce80a1fb1423ca40a23b5 (diff) |
(tl)perl 5.18.2 for windows from siep
git-svn-id: svn://tug.org/texlive/trunk@33648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/List')
-rw-r--r-- | Master/tlpkg/tlperl/lib/List/Util.pm | 15 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/List/Util/XS.pm | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Master/tlpkg/tlperl/lib/List/Util.pm b/Master/tlpkg/tlperl/lib/List/Util.pm index 033ef505c0f..5988aa914ec 100644 --- a/Master/tlpkg/tlperl/lib/List/Util.pm +++ b/Master/tlpkg/tlperl/lib/List/Util.pm @@ -12,14 +12,20 @@ use strict; require Exporter; our @ISA = qw(Exporter); -our @EXPORT_OK = qw(first min max minstr maxstr reduce sum shuffle); -our $VERSION = "1.25"; +our @EXPORT_OK = qw(first min max minstr maxstr reduce sum sum0 shuffle); +our $VERSION = "1.27"; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; require XSLoader; XSLoader::load('List::Util', $XS_VERSION); +sub sum0 +{ + return 0 unless @_; + goto ∑ +} + 1; __END__ @@ -164,6 +170,11 @@ C<undef> being returned $foo = sum 0, @values; +=item sum0 LIST + +Similar to C<sum>, except this returns 0 when given an empty list, rather +than C<undef>. + =back =head1 KNOWN BUGS diff --git a/Master/tlpkg/tlperl/lib/List/Util/XS.pm b/Master/tlpkg/tlperl/lib/List/Util/XS.pm index d46853ca234..01b944b5ab2 100644 --- a/Master/tlpkg/tlperl/lib/List/Util/XS.pm +++ b/Master/tlpkg/tlperl/lib/List/Util/XS.pm @@ -2,7 +2,7 @@ package List::Util::XS; use strict; use List::Util; -our $VERSION = "1.25"; # FIXUP +our $VERSION = "1.27"; # FIXUP $VERSION = eval $VERSION; # FIXUP 1; |