On Thu Jun 05 10:05:39 2014, PEVANS wrote:
Show quoted text> I'll do a bit of digging on the others as well, and see if I can work
> out a version to put for all of them.
Turns out actually most of the other functions are so old that documenting this won't be useful.
--
Paul Evans
diff --git a/lib/List/Util.pm b/lib/List/Util.pm
index 5f721f0..1b69259 100644
--- a/lib/List/Util.pm
+++ b/lib/List/Util.pm
@@ -112,6 +112,8 @@ idea.
=head2 $b = any { BLOCK } @list
+I<Since version 1.33.>
+
Similar to C<grep> in that it evaluates C<BLOCK> setting C<$_> to each element
of C<@list> in turn. C<any> returns true if any element makes the C<BLOCK>
return a true value. If C<BLOCK> never returns true or C<@list> was empty then
@@ -126,6 +128,8 @@ instead, as it can short-circuit after the first true result.
=head2 $b = all { BLOCK } @list
+I<Since version 1.33.>
+
Similar to C<any>, except that it requires all elements of the C<@list> to make
the C<BLOCK> return true. If any element returns false, then it returns false.
If the C<BLOCK> never returns false or the C<@list> was empty then it returns
@@ -135,6 +139,8 @@ true.
=head2 $b = notall { BLOCK } @list
+I<Since version 1.33.>
+
Similar to C<any> and C<all>, but with the return sense inverted. C<none>
returns true only if no value in the LIST causes the BLOCK to return true, and
C<notall> returns true only if not all of the values do.
@@ -190,6 +196,8 @@ empty then C<undef> is returned.
=head2 $num = product @list
+I<Since version 1.35.>
+
Returns the numerical product of all the elements in C<@list>. If C<@list> is
empty then C<1> is returned.
@@ -207,6 +215,8 @@ compatibility, if C<@list> is empty then C<undef> is returned.
=head2 $num = sum0 @list
+I<Since version 1.26.>
+
Similar to C<sum>, except this returns 0 when given an empty list, rather than
C<undef>.
@@ -226,6 +236,8 @@ value - nor even do they require that the first of each pair be a plain string.
=head2 $count = pairgrep { BLOCK } @kvlist
+I<Since version 1.29.>
+
Similar to perl's C<grep> keyword, but interprets the given list as an
even-sized list of pairs. It invokes the C<BLOCK> multiple times, in scalar
context, with C<$a> and C<$b> set to successive pairs of values from the
@@ -246,6 +258,8 @@ will be visible to the caller.
=head2 $found = pairfirst { BLOCK } @kvlist
+I<Since version 1.30.>
+
Similar to the C<first> function, but interprets the given list as an
even-sized list of pairs. It invokes the C<BLOCK> multiple times, in scalar
context, with C<$a> and C<$b> set to successive pairs of values from the
@@ -266,6 +280,8 @@ will be visible to the caller.
=head2 $count = pairmap { BLOCK } @kvlist
+I<Since version 1.29.>
+
Similar to perl's C<map> keyword, but interprets the given list as an
even-sized list of pairs. It invokes the C<BLOCK> multiple times, in list
context, with C<$a> and C<$b> set to successive pairs of values from the
@@ -285,6 +301,8 @@ See L</KNOWN BUGS> for a known-bug with C<pairmap>, and a workaround.
=head2 @pairs = pairs @kvlist
+I<Since version 1.29.>
+
A convenient shortcut to operating on even-sized lists of pairs, this function
returns a list of ARRAY references, each containing two items from the given
list. It is a more efficient version of
@@ -309,6 +327,8 @@ the two methods C<key> and C<value>. The following code is equivalent:
=head2 @keys = pairkeys @kvlist
+I<Since version 1.29.>
+
A convenient shortcut to operating on even-sized lists of pairs, this function
returns a list of the the first values of each of the pairs in the given list.
It is a more efficient version of
@@ -317,6 +337,8 @@ It is a more efficient version of
=head2 @values = pairvalues @kvlist
+I<Since version 1.29.>
+
A convenient shortcut to operating on even-sized lists of pairs, this function
returns a list of the the second values of each of the pairs in the given list.
It is a more efficient version of
diff --git a/lib/Scalar/Util.pm b/lib/Scalar/Util.pm
index 4ab67f9..a8733aa 100644
--- a/lib/Scalar/Util.pm
+++ b/lib/Scalar/Util.pm
@@ -156,6 +156,8 @@ array.
=head2 unweaken( REF )
+I<Since version 1.36.>
+
The lvalue C<REF> will be turned from a weak reference back into a normal
(strong) reference again. This function mutates the lvalue passed as its
argument and returns no value. This undoes the action performed by
@@ -198,6 +200,8 @@ C<$string> in a string context.
=head2 $dual = isdual( $var )
+I<Since version 1.26.>
+
If C<$var> is a scalar that has both numeric and string values, the result is
true.