Hello community,
here is the log from the commit of package perl-List-MoreUtils for
openSUSE:Factory checked in at 2016-05-13 09:23:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-List-MoreUtils (Old)
and /work/SRC/openSUSE:Factory/.perl-List-MoreUtils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-List-MoreUtils"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-List-MoreUtils/perl-List-MoreUtils.changes
2015-06-15 17:47:03.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-List-MoreUtils.new/perl-List-MoreUtils.changes
2016-05-13 09:23:26.000000000 +0200
@@ -1,0 +2,23 @@
+Thu May 5 09:30:24 UTC 2016 - [email protected]
+
+- updated to 0.415
+ see /usr/share/doc/packages/perl-List-MoreUtils/Changes
+
+ 0.415 2016-05-01
+ - Release 0.414_001 as 0.415 without further changes
+
+ 0.414_001 2016-04-13
+ - fix RT#75727 - after's XS implementation call XSRETURN(-1) when it
+ doesn't find an element (2nd patch provided by Reini Urban,
+ regression test provided by Tony Cook)
+ - fix RT#113117 - XS's minmax() sometimes return undef (perl >= 5.20),
+ thanks PERLANCAR and SREZIC
+ - explicit test for thesis in RT#110998 - XS implementation of pairwise
+ fails with memory allocation error when there are more return values
+ than in original lists -- thesis is proven wrong
+ - efficiency improvements by bulk88
+ - improve some tests to get clearer reports
+ - distinguish between "Makefile.PL find's a .git directory" and
+ "Makefile.PL runs in maintainer mode"
+
+-------------------------------------------------------------------
Old:
----
List-MoreUtils-0.413.tar.gz
New:
----
List-MoreUtils-0.415.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-List-MoreUtils.spec ++++++
--- /var/tmp/diff_new_pack.cQMtDP/_old 2016-05-13 09:23:27.000000000 +0200
+++ /var/tmp/diff_new_pack.cQMtDP/_new 2016-05-13 09:23:27.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-List-MoreUtils
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: perl-List-MoreUtils
-Version: 0.413
+Version: 0.415
Release: 0
%define cpan_name List-MoreUtils
Summary: Provide the stuff missing in List::Util
@@ -37,7 +37,7 @@
%description
*List::MoreUtils* provides some trivial but commonly needed functionality
-on lists which is not going to go into the List::Util manpage.
+on lists which is not going to go into List::Util.
All of the below functions are implementable in only a couple of lines of
Perl code. Using the functions from this module however should give
++++++ List-MoreUtils-0.413.tar.gz -> List-MoreUtils-0.415.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/Changes
new/List-MoreUtils-0.415/Changes
--- old/List-MoreUtils-0.413/Changes 2015-06-10 13:03:20.000000000 +0200
+++ new/List-MoreUtils-0.415/Changes 2016-05-01 18:49:36.000000000 +0200
@@ -1,5 +1,22 @@
Revision history for Perl extension List-MoreUtils
+0.415 2016-05-01
+ - Release 0.414_001 as 0.415 without further changes
+
+0.414_001 2016-04-13
+ - fix RT#75727 - after's XS implementation call XSRETURN(-1) when it
+ doesn't find an element (2nd patch provided by Reini Urban,
+ regression test provided by Tony Cook)
+ - fix RT#113117 - XS's minmax() sometimes return undef (perl >= 5.20),
+ thanks PERLANCAR and SREZIC
+ - explicit test for thesis in RT#110998 - XS implementation of pairwise
+ fails with memory allocation error when there are more return values
+ than in original lists -- thesis is proven wrong
+ - efficiency improvements by bulk88
+ - improve some tests to get clearer reports
+ - distinguish between "Makefile.PL find's a .git directory" and
+ "Makefile.PL runs in maintainer mode"
+
0.413 2015-06-10
- Fix compiling in c++ mode (depreciated, but some people seem to
require it). Solves RT#104690
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/META.json
new/List-MoreUtils-0.415/META.json
--- old/List-MoreUtils-0.413/META.json 2015-06-10 15:07:28.000000000 +0200
+++ new/List-MoreUtils-0.415/META.json 2016-05-01 18:59:50.000000000 +0200
@@ -6,7 +6,7 @@
"Jens Rehsack <[email protected]>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter
version 2.150001",
+ "generated_by" : "ExtUtils::MakeMaker version 7.14, CPAN::Meta::Converter
version 2.150005",
"license" : [
"perl_5"
],
@@ -76,7 +76,7 @@
"resources" : {
"bugtracker" : {
"mailto" : "[email protected]",
- "web" :
"http://rt.cpan.org/Public/Dist/Display.html?Name=List-MoreUtils"
+ "web" : "https://rt.cpan.org/Dist/Display.html?Name=List-MoreUtils"
},
"homepage" : "https://metacpan.org/release/List-MoreUtils",
"license" : [
@@ -88,5 +88,6 @@
"web" : "https://github.com/perl5-utils/List-MoreUtils"
}
},
- "version" : "0.413"
+ "version" : "0.415",
+ "x_serialization_backend" : "JSON::PP version 2.27400"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/META.yml
new/List-MoreUtils-0.415/META.yml
--- old/List-MoreUtils-0.413/META.yml 2015-06-10 15:07:27.000000000 +0200
+++ new/List-MoreUtils-0.415/META.yml 2016-05-01 18:59:50.000000000 +0200
@@ -16,7 +16,7 @@
IPC::Cmd: '0'
base: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter
version 2.150001'
+generated_by: 'ExtUtils::MakeMaker version 7.14, CPAN::Meta::Converter version
2.150005'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -30,8 +30,9 @@
Exporter::Tiny: '0.038'
XSLoader: '0'
resources:
- bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=List-MoreUtils
+ bugtracker: https://rt.cpan.org/Dist/Display.html?Name=List-MoreUtils
homepage: https://metacpan.org/release/List-MoreUtils
license: http://dev.perl.org/licenses/
repository: https://github.com/perl5-utils/List-MoreUtils.git
-version: '0.413'
+version: '0.415'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/Makefile.PL
new/List-MoreUtils-0.415/Makefile.PL
--- old/List-MoreUtils-0.413/Makefile.PL 2015-05-11 17:45:30.000000000
+0200
+++ new/List-MoreUtils-0.415/Makefile.PL 2016-04-13 11:51:07.000000000
+0200
@@ -64,7 +64,7 @@
use inc::Config::AutoConf::LMU ();
-if ( -d ".git" )
+if ( -d "Sandbox" )
{
eval "use Sandbox::Tumble ();";
$@ and die $@;
@@ -116,7 +116,7 @@
type => 'git',
},
bugtracker => {
- web =>
'http://rt.cpan.org/Public/Dist/Display.html?Name=List-MoreUtils',
+ web =>
'https://rt.cpan.org/Dist/Display.html?Name=List-MoreUtils',
mailto => '[email protected]',
},
license => 'http://dev.perl.org/licenses/',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/MoreUtils.xs
new/List-MoreUtils-0.415/MoreUtils.xs
--- old/List-MoreUtils-0.413/MoreUtils.xs 2015-06-10 13:01:07.000000000
+0200
+++ new/List-MoreUtils-0.415/MoreUtils.xs 2016-04-12 15:30:28.000000000
+0200
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
@@ -33,7 +34,7 @@
* 2: left or right was a NaN
*/
static I32
-ncmp(SV* left, SV * right)
+LMUncmp(pTHX_ SV* left, SV * right)
{
/* Fortunately it seems NaN isn't IOK */
if(SvAMAGIC(left) || SvAMAGIC(right))
@@ -103,6 +104,8 @@
}
}
+#define ncmp(left,right) LMUncmp(aTHX_ left,right)
+
#define FUNC_NAME GvNAME(GvEGV(ST(items)))
/* shameless stolen from PadWalker */
@@ -132,7 +135,7 @@
#endif
static int
-in_pad (SV *code)
+in_pad (pTHX_ SV *code)
{
GV *gv;
HV *stash;
@@ -249,8 +252,8 @@
int natatime;
} natatime_args;
-void
-insert_after (int idx, SV *what, AV *av) {
+static void
+insert_after (pTHX_ int idx, SV *what, AV *av) {
int i, len;
av_extend(av, (len = av_len(av) + 1));
@@ -264,7 +267,7 @@
}
static int
-is_like(SV *sv, const char *like)
+is_like(pTHX_ SV *sv, const char *like)
{
int likely = 0;
if( sv_isobject( sv ) )
@@ -305,19 +308,23 @@
}
static int
-codelike(SV *code)
+LMUcodelike(pTHX_ SV *code)
{
SvGETMAGIC(code);
- return SvROK(code) && ( ( SVt_PVCV == SvTYPE(SvRV(code)) ) || (
is_like(code, "&{}" ) ) );
+ return SvROK(code) && ( ( SVt_PVCV == SvTYPE(SvRV(code)) ) || (
is_like(aTHX_ code, "&{}" ) ) );
}
+#define codelike(code) LMUcodelike(aTHX_ code)
+
static int
-arraylike(SV *array)
+LMUarraylike(pTHX_ SV *array)
{
SvGETMAGIC(array);
- return is_array(array) || is_like( array, "@{}" );
+ return is_array(array) || is_like(aTHX_ array, "@{}" );
}
+#define arraylike(array) LMUarraylike(aTHX_ array)
+
MODULE = List::MoreUtils_ea PACKAGE = List::MoreUtils_ea
void
@@ -767,7 +774,7 @@
if (RETVAL) {
SvREFCNT_inc(val);
- insert_after(i, val, av);
+ insert_after(aTHX_ i, val, av);
}
}
OUTPUT:
@@ -816,7 +823,7 @@
}
if (RETVAL) {
SvREFCNT_inc(val);
- insert_after(i, val, av);
+ insert_after(aTHX_ i, val, av);
}
}
@@ -897,7 +904,8 @@
for (j = i + 1; j < items; ++j)
args[j-i-1] = args[j];
- XSRETURN(items-i-1);
+ j = items-i-1;
+ XSRETURN(j > 0 ? j : 0);
}
void
@@ -1213,7 +1221,7 @@
if(!arraylike(ST(2)))
croak_xs_usage(cv, "code, list, list");
- if (in_pad(code)) {
+ if (in_pad(aTHX_ code)) {
croak("Can't use lexical $a or $b in pairwise code block");
}
@@ -1502,14 +1510,14 @@
if (!items)
XSRETURN_EMPTY;
- minsv = maxsv = ST(0);
-
if (items == 1) {
EXTEND(SP, 1);
- ST(0) = ST(1) = minsv;
+ ST(1) = sv_2mortal(newSVsv(ST(0)));
XSRETURN(2);
}
+ minsv = maxsv = ST(0);
+
for (i = 1; i < items; i += 2) {
SV *asv = ST(i-1);
SV *bsv = ST(i);
@@ -1544,6 +1552,7 @@
maxsv = rsv;
}
}
+
ST(0) = minsv;
ST(1) = maxsv;
@@ -1594,8 +1603,7 @@
}
if (!tmp[idx])
tmp[idx] = newAV();
- av_push(tmp[idx], args[i]);
- SvREFCNT_inc(args[i]);
+ av_push(tmp[idx], newSVsv( args[i] ));
}
POP_MULTICALL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/List-MoreUtils-0.413/inc/inc_Capture-Tiny/Capture/Tiny.pm
new/List-MoreUtils-0.415/inc/inc_Capture-Tiny/Capture/Tiny.pm
--- old/List-MoreUtils-0.413/inc/inc_Capture-Tiny/Capture/Tiny.pm
2015-06-10 15:06:52.000000000 +0200
+++ new/List-MoreUtils-0.415/inc/inc_Capture-Tiny/Capture/Tiny.pm
2016-05-01 18:16:17.000000000 +0200
@@ -3,7 +3,7 @@
use warnings;
package Capture::Tiny;
# ABSTRACT: Capture STDOUT and STDERR from Perl, XS or external programs
-our $VERSION = '0.30';
+our $VERSION = '0.36';
use Carp ();
use Exporter ();
use IO::Handle ();
@@ -83,10 +83,18 @@
sub _relayer {
my ($fh, $layers) = @_;
# _debug("# requested layers (@{$layers}) for @{[fileno $fh]}\n");
- my %seen = ( unix => 1, perlio => 1 ); # filter these out
- my @unique = grep { !$seen{$_}++ } @$layers;
- # _debug("# applying unique layers (@unique) to @{[fileno $fh]}\n");
- binmode($fh, join(":", ":raw", @unique));
+
+ # eliminate pseudo-layers
+ binmode( $fh, ":raw" );
+ # strip off real layers until only :unix is left
+ while ( 1 < ( my $layers =()= PerlIO::get_layers( $fh, output => 1 ) ) ) {
+ binmode( $fh, ":pop" );
+ }
+ # apply other layers
+ my @to_apply = @$layers;
+ shift @to_apply; # eliminate initial :unix
+ # _debug("# applying layers (unix @to_apply) to @{[fileno $fh]}\n");
+ binmode($fh, ":" . join(":",@to_apply));
}
sub _name {
@@ -209,7 +217,9 @@
$stash->{flag_files}{$which} = scalar tmpnam();
# execute @cmd as a separate process
if ( $IS_WIN32 ) {
- local $@;
+ my $old_eval_err=$@;
+ undef $@;
+
eval "use Win32API::File qw/GetOsFHandle SetHandleInformation
fileLastError HANDLE_FLAG_INHERIT INVALID_HANDLE_VALUE/ ";
# _debug( "# Win32API::File loaded\n") unless $@;
my $os_fhandle = GetOsFHandle( $stash->{tee}{$which} );
@@ -219,6 +229,7 @@
_open_std( $stash->{child}{$which} );
$stash->{pid}{$which} = system(1, @cmd, $stash->{flag_files}{$which});
# not restoring std here as it all gets redirected again shortly anyway
+ $@=$old_eval_err;
}
else { # use fork
_fork_exec( $which, $stash );
@@ -358,19 +369,22 @@
# _debug( "# redirecting in parent ...\n" );
_open_std( $stash->{new} );
# execute user provided code
- my ($exit_code, $inner_error, $outer_error, @result);
+ my ($exit_code, $inner_error, $outer_error, $orig_pid, @result);
{
+ $orig_pid = $$;
local *STDIN = *CT_ORIG_STDIN if $localize{stdin}; # get original, not
proxy STDIN
# _debug( "# finalizing layers ...\n" );
_relayer(\*STDOUT, $layers{stdout}) if $do_stdout;
_relayer(\*STDERR, $layers{stderr}) if $do_stderr;
# _debug( "# running code $code ...\n" );
- local $@;
+ my $old_eval_err=$@;
+ undef $@;
eval { @result = $code->(); $inner_error = $@ };
$exit_code = $?; # save this for later
$outer_error = $@; # save this for later
STDOUT->flush if $do_stdout;
STDERR->flush if $do_stderr;
+ $@ = $old_eval_err;
}
# restore prior filehandles and shut down tees
# _debug( "# restoring filehandles ...\n" );
@@ -385,7 +399,7 @@
# return captured output, but shortcut in void context
# unless we have to echo output to tied/scalar handles;
my %got;
- if ( defined wantarray or ($do_tee && keys %localize) ) {
+ if ( $orig_pid == $$ and ( defined wantarray or ($do_tee && keys %localize)
) ) {
for ( keys %do ) {
_relayer($stash->{capture}{$_}, $layers{$_});
$got{$_} = _slurp($_, $stash);
@@ -422,39 +436,39 @@
=head1 VERSION
-version 0.30
+version 0.36
=head1 SYNOPSIS
- use Capture::Tiny ':all';
-
- # capture from external command
-
- ($stdout, $stderr, $exit) = capture {
- system( $cmd, @args );
- };
-
- # capture from arbitrary code (Perl or external)
-
- ($stdout, $stderr, @result) = capture {
- # your code here
- };
-
- # capture partial or merged output
-
- $stdout = capture_stdout { ... };
- $stderr = capture_stderr { ... };
- $merged = capture_merged { ... };
-
- # tee output
-
- ($stdout, $stderr) = tee {
- # your code here
- };
-
- $stdout = tee_stdout { ... };
- $stderr = tee_stderr { ... };
- $merged = tee_merged { ... };
+ use Capture::Tiny ':all';
+
+ # capture from external command
+
+ ($stdout, $stderr, $exit) = capture {
+ system( $cmd, @args );
+ };
+
+ # capture from arbitrary code (Perl or external)
+
+ ($stdout, $stderr, @result) = capture {
+ # your code here
+ };
+
+ # capture partial or merged output
+
+ $stdout = capture_stdout { ... };
+ $stderr = capture_stderr { ... };
+ $merged = capture_merged { ... };
+
+ # tee output
+
+ ($stdout, $stderr) = tee {
+ # your code here
+ };
+
+ $stdout = tee_stdout { ... };
+ $stderr = tee_stderr { ... };
+ $merged = tee_merged { ... };
=head1 DESCRIPTION
@@ -471,10 +485,10 @@
=head2 capture
- ($stdout, $stderr, @result) = capture \&code;
- $stdout = capture \&code;
+ ($stdout, $stderr, @result) = capture \&code;
+ $stdout = capture \&code;
-The C<<< capture >>> function takes a code reference and returns what is sent
to
+The C<capture> function takes a code reference and returns what is sent to
STDOUT and STDERR as well as any return values from the code reference. In
scalar context, it returns only STDOUT. If no output was received for a
filehandle, it returns an empty string for that filehandle. Regardless of
calling
@@ -483,70 +497,70 @@
It is prototyped to take a subroutine reference as an argument. Thus, it
can be called in block form:
- ($stdout, $stderr) = capture {
- # your code here ...
- };
+ ($stdout, $stderr) = capture {
+ # your code here ...
+ };
Note that the coderef is evaluated in list context. If you wish to force
-scalar context on the return value, you must use the C<<< scalar >>> keyword.
+scalar context on the return value, you must use the C<scalar> keyword.
- ($stdout, $stderr, $count) = capture {
- my @list = qw/one two three/;
- return scalar @list; # $count will be 3
- };
+ ($stdout, $stderr, $count) = capture {
+ my @list = qw/one two three/;
+ return scalar @list; # $count will be 3
+ };
-Also note that within the coderef, the C<<< @_ >>> variable will be empty. So
don't
+Also note that within the coderef, the C<@_> variable will be empty. So don't
use arguments from a surrounding subroutine without copying them to an array
first:
- sub wont_work {
- my ($stdout, $stderr) = capture { do_stuff( @_ ) }; # WRONG
- ...
- }
-
- sub will_work {
- my @args = @_;
- my ($stdout, $stderr) = capture { do_stuff( @args ) }; # RIGHT
- ...
- }
+ sub wont_work {
+ my ($stdout, $stderr) = capture { do_stuff( @_ ) }; # WRONG
+ ...
+ }
+
+ sub will_work {
+ my @args = @_;
+ my ($stdout, $stderr) = capture { do_stuff( @args ) }; # RIGHT
+ ...
+ }
Captures are normally done to an anonymous temporary filehandle. To
capture via a named file (e.g. to externally monitor a long-running capture),
provide custom filehandles as a trailing list of option pairs:
- my $out_fh = IO::File->new("out.txt", "w+");
- my $err_fh = IO::File->new("out.txt", "w+");
- capture { ... } stdout => $out_fh, stderr => $err_fh;
+ my $out_fh = IO::File->new("out.txt", "w+");
+ my $err_fh = IO::File->new("out.txt", "w+");
+ capture { ... } stdout => $out_fh, stderr => $err_fh;
-The filehandles must be readE<sol>write and seekable. Modifying the files or
+The filehandles must be read/write and seekable. Modifying the files or
filehandles during a capture operation will give unpredictable results.
Existing IO layers on them may be changed by the capture.
-When called in void context, C<<< capture >>> saves memory and time by
+When called in void context, C<capture> saves memory and time by
not reading back from the capture handles.
=head2 capture_stdout
- ($stdout, @result) = capture_stdout \&code;
- $stdout = capture_stdout \&code;
+ ($stdout, @result) = capture_stdout \&code;
+ $stdout = capture_stdout \&code;
-The C<<< capture_stdout >>> function works just like C<<< capture >>> except
only
+The C<capture_stdout> function works just like C<capture> except only
STDOUT is captured. STDERR is not captured.
=head2 capture_stderr
- ($stderr, @result) = capture_stderr \&code;
- $stderr = capture_stderr \&code;
+ ($stderr, @result) = capture_stderr \&code;
+ $stderr = capture_stderr \&code;
-The C<<< capture_stderr >>> function works just like C<<< capture >>> except
only
+The C<capture_stderr> function works just like C<capture> except only
STDERR is captured. STDOUT is not captured.
=head2 capture_merged
- ($merged, @result) = capture_merged \&code;
- $merged = capture_merged \&code;
+ ($merged, @result) = capture_merged \&code;
+ $merged = capture_merged \&code;
-The C<<< capture_merged >>> function works just like C<<< capture >>> except
STDOUT and
+The C<capture_merged> function works just like C<capture> except STDOUT and
STDERR are merged. (Technically, STDERR is redirected to the same capturing
handle as STDOUT before executing the function.)
@@ -555,39 +569,39 @@
=head2 tee
- ($stdout, $stderr, @result) = tee \&code;
- $stdout = tee \&code;
+ ($stdout, $stderr, @result) = tee \&code;
+ $stdout = tee \&code;
-The C<<< tee >>> function works just like C<<< capture >>>, except that output
is captured
+The C<tee> function works just like C<capture>, except that output is captured
as well as passed on to the original STDOUT and STDERR.
-When called in void context, C<<< tee >>> saves memory and time by
+When called in void context, C<tee> saves memory and time by
not reading back from the capture handles, except when the
original STDOUT OR STDERR were tied or opened to a scalar
handle.
=head2 tee_stdout
- ($stdout, @result) = tee_stdout \&code;
- $stdout = tee_stdout \&code;
+ ($stdout, @result) = tee_stdout \&code;
+ $stdout = tee_stdout \&code;
-The C<<< tee_stdout >>> function works just like C<<< tee >>> except only
+The C<tee_stdout> function works just like C<tee> except only
STDOUT is teed. STDERR is not teed (output goes to STDERR as usual).
=head2 tee_stderr
- ($stderr, @result) = tee_stderr \&code;
- $stderr = tee_stderr \&code;
+ ($stderr, @result) = tee_stderr \&code;
+ $stderr = tee_stderr \&code;
-The C<<< tee_stderr >>> function works just like C<<< tee >>> except only
+The C<tee_stderr> function works just like C<tee> except only
STDERR is teed. STDOUT is not teed (output goes to STDOUT as usual).
=head2 tee_merged
- ($merged, @result) = tee_merged \&code;
- $merged = tee_merged \&code;
+ ($merged, @result) = tee_merged \&code;
+ $merged = tee_merged \&code;
-The C<<< tee_merged >>> function works just like C<<< capture_merged >>>
except that output
+The C<tee_merged> function works just like C<capture_merged> except that output
is captured as well as passed on to STDOUT.
Caution: STDOUT and STDERR output in the merged result are not guaranteed to be
@@ -597,17 +611,17 @@
=head2 Portability
-Portability is a goal, not a guarantee. C<<< tee >>> requires fork, except on
-Windows where C<<< system(1, @cmd) >>> is used instead. Not tested on any
+Portability is a goal, not a guarantee. C<tee> requires fork, except on
+Windows where C<system(1, @cmd)> is used instead. Not tested on any
particularly esoteric platforms yet. See the
L<CPAN Testers Matrix|http://matrix.cpantesters.org/?dist=Capture-Tiny>
for test result by platform.
=head2 PerlIO layers
-Capture::Tiny does it's best to preserve PerlIO layers such as ':utf8' or
+Capture::Tiny does its best to preserve PerlIO layers such as ':utf8' or
':crlf' when capturing (only for Perl 5.8.1+) . Layers should be applied to
-STDOUT or STDERR I<before> the call to C<<< capture >>> or C<<< tee >>>. This
may not work
+STDOUT or STDERR I<before> the call to C<capture> or C<tee>. This may not work
for tied filehandles (see below).
=head2 Modifying filehandles before capturing
@@ -615,11 +629,11 @@
Generally speaking, you should do little or no manipulation of the standard IO
filehandles prior to using Capture::Tiny. In particular, closing, reopening,
localizing or tying standard filehandles prior to capture may cause a variety
of
-unexpected, undesirable andE<sol>or unreliable behaviors, as described below.
+unexpected, undesirable and/or unreliable behaviors, as described below.
Capture::Tiny does its best to compensate for these situations, but the
results may not be what you desire.
-B<Closed filehandles>
+=head3 Closed filehandles
Capture::Tiny will work even if STDIN, STDOUT or STDERR have been previously
closed. However, since they will be reopened to capture or tee output, any
@@ -634,18 +648,18 @@
Prior to Perl 5.12, closed STDIN combined with PERL_UNICODE=D leaks filehandles
and also breaks tee() for undiagnosed reasons. So don't do that.
-B<Localized filehandles>
+=head3 Localized filehandles
If code localizes any of Perl's standard filehandles before capturing, the
capture
will affect the localized filehandles and not the original ones. External
system
calls are not affected by localizing a filehandle in Perl and will continue
to send output to the original filehandles (which will thus not be captured).
-B<Scalar filehandles>
+=head3 Scalar filehandles
If STDOUT or STDERR are reopened to scalar filehandles prior to the call to
-C<<< capture >>> or C<<< tee >>>, then Capture::Tiny will override the output
filehandle for
-the duration of the C<<< capture >>> or C<<< tee >>> call and then, for C<<<
tee >>>, send captured
+C<capture> or C<tee>, then Capture::Tiny will override the output filehandle
for
+the duration of the C<capture> or C<tee> call and then, for C<tee>, send
captured
output to the output filehandle after the capture is complete. (Requires Perl
5.8)
@@ -654,20 +668,20 @@
a handle. Capture::Tiny tries to ensure that external processes will read from
the null device instead, but this is not guaranteed.
-B<Tied output filehandles>
+=head3 Tied output filehandles
-If STDOUT or STDERR are tied prior to the call to C<<< capture >>> or C<<< tee
>>>, then
+If STDOUT or STDERR are tied prior to the call to C<capture> or C<tee>, then
Capture::Tiny will attempt to override the tie for the duration of the
-C<<< capture >>> or C<<< tee >>> call and then send captured output to the
tied filehandle after
+C<capture> or C<tee> call and then send captured output to the tied filehandle
after
the capture is complete. (Requires Perl 5.8)
Capture::Tiny may not succeed resending UTF-8 encoded data to a tied
STDOUT or STDERR filehandle. Characters may appear as bytes. If the tied
filehandle
is based on L<Tie::StdHandle>, then Capture::Tiny will attempt to determine
-appropriate layers like C<<< :utf8 >>> from the underlying filehandle and do
the right
+appropriate layers like C<:utf8> from the underlying filehandle and do the
right
thing.
-B<Tied input filehandle>
+=head3 Tied input filehandle
Capture::Tiny attempts to preserve the semantics of tied STDIN, but this
requires Perl 5.8 and is not entirely predictable. External processes
@@ -676,13 +690,21 @@
Unless having STDIN tied is crucial, it may be safest to localize STDIN when
capturing:
- my ($out, $err) = do { local *STDIN; capture { ... } };
+ my ($out, $err) = do { local *STDIN; capture { ... } };
=head2 Modifying filehandles during a capture
-Attempting to modify STDIN, STDOUT or STDERR I<during> C<<< capture >>> or
C<<< tee >>> is
+Attempting to modify STDIN, STDOUT or STDERR I<during> C<capture> or C<tee> is
almost certainly going to cause problems. Don't do that.
+=head3 Forking inside a capture
+
+Forks aren't portable. The behavior of filehandles during a fork is even
+less so. If Capture::Tiny detects that a fork has occurred within a
+capture, it will shortcut in the child process and return empty strings for
+captures. Other problems may occur in the child or parent, as well.
+Forking in a capture block is not recommended.
+
=head2 No support for Perl 5.8.0
It's just too buggy when it comes to layers and UTF-8. Perl 5.8.1 or later
@@ -696,18 +718,18 @@
=head2 PERL_CAPTURE_TINY_TIMEOUT
-Capture::Tiny uses subprocesses internally for C<<< tee >>>. By default,
+Capture::Tiny uses subprocesses internally for C<tee>. By default,
Capture::Tiny will timeout with an error if such subprocesses are not ready to
receive data within 30 seconds (or whatever is the value of
-C<<< $Capture::Tiny::TIMEOUT >>>). An alternate timeout may be specified by
setting
-the C<<< PERL_CAPTURE_TINY_TIMEOUT >>> environment variable. Setting it to
zero will
-disable timeouts. BE<lt>NOTEE<gt>, this does not timeout the code reference
being
+C<$Capture::Tiny::TIMEOUT>). An alternate timeout may be specified by setting
+the C<PERL_CAPTURE_TINY_TIMEOUT> environment variable. Setting it to zero will
+disable timeouts. B<NOTE>, this does not timeout the code reference being
captured -- this only prevents Capture::Tiny itself from hanging your process
waiting for its child processes to be ready to proceed.
=head1 SEE ALSO
-This module was, inspired by L<IO::CaptureOutput>, which provides
+This module was inspired by L<IO::CaptureOutput>, which provides
similar functionality without the ability to tee output and with more
complicated code and API. L<IO::CaptureOutput> does not handle layers
or most of the unusual cases described in the L</Limitations> section and
@@ -718,7 +740,7 @@
circumstances. I'm probably missing some. The long list is provided to show
why I felt Capture::Tiny was necessary.
-=over
+=over 4
=item *
@@ -831,7 +853,7 @@
=head1 CONTRIBUTORS
-=for stopwords Dagfinn Ilmari Mannsåker David E. Wheeler
+=for stopwords Dagfinn Ilmari Mannsåker David E. Wheeler fecundf
=over 4
@@ -843,6 +865,10 @@
David E. Wheeler <[email protected]>
+=item *
+
+fecundf <[email protected]>
+
=back
=head1 COPYRIGHT AND LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/List-MoreUtils-0.413/inc/inc_Config-AutoConf/Config/AutoConf.pm
new/List-MoreUtils-0.415/inc/inc_Config-AutoConf/Config/AutoConf.pm
--- old/List-MoreUtils-0.413/inc/inc_Config-AutoConf/Config/AutoConf.pm
2015-06-10 15:06:52.000000000 +0200
+++ new/List-MoreUtils-0.415/inc/inc_Config-AutoConf/Config/AutoConf.pm
2016-05-01 18:16:17.000000000 +0200
@@ -92,7 +92,7 @@
=cut
-our $VERSION = '0.311';
+our $VERSION = '0.313';
$VERSION = eval $VERSION;
=head1 ABSTRACT
@@ -134,7 +134,7 @@
(especially optional arguments) more Perl'ish than m4 abilities allow
to the original.
-=head1 FUNCTIONS
+=head1 CONSTRUCTOR
=cut
@@ -184,6 +184,8 @@
bless( \%instance, $class );
}
+=head1 METHODS
+
=head2 check_file
This function checks if a file exists in the system and is readable by
@@ -451,7 +453,11 @@
"ac_cv_prog_lex_root",
"for lex output file root",
sub {
- my ( $fh, $filename ) = tempfile( "testXXXXXX", SUFFIX => '.l'
);
+ my ( $fh, $filename ) = tempfile(
+ "testXXXXXX",
+ SUFFIX => '.l',
+ UNLINK => 0
+ );
my $src = <<'EOLEX';
%%
a { ECHO; }
@@ -1073,7 +1079,7 @@
my ( $fh, $filename ) = tempfile(
"testXXXXXX",
SUFFIX => '.c',
- , UNLINK => 0
+ UNLINK => 0
);
print {$fh} $src;
@@ -1094,6 +1100,7 @@
};
unlink $filename;
+ $obj_file and !-f $obj_file and undef $obj_file;
unlink $obj_file if $obj_file;
if ( $exception || !$obj_file )
@@ -1138,7 +1145,11 @@
my $builder = $self->_get_builder();
- my ( $fh, $filename ) = tempfile( "testXXXXXX", SUFFIX => '.c' );
+ my ( $fh, $filename ) = tempfile(
+ "testXXXXXX",
+ SUFFIX => '.c',
+ UNLINK => 0
+ );
print {$fh} $src;
close $fh;
@@ -1157,6 +1168,8 @@
$exception = $@;
};
+ $obj_file and !-f $obj_file and undef $obj_file;
+
if ( $exception || !$obj_file )
{
$self->_add_log_lines( "compile stage failed" . ( $exception ? " - " .
$exception : "" ) );
@@ -1188,6 +1201,9 @@
$exception = $@;
};
+
+ $exe_file and !-f $exe_file and undef $exe_file;
+
unlink $filename;
unlink $obj_file if $obj_file;
unlink $exe_file if $exe_file;
@@ -2164,8 +2180,8 @@
my $type = $1;
$member = $2;
- my $cache_name = $self->_cache_type_name( "$type.$member" );
- my $check_sub = sub {
+ my $cache_name = $self->_cache_type_name("$type.$member");
+ my $check_sub = sub {
my $body = <<ACEOF;
static $type check_aggr;
@@ -2173,14 +2189,29 @@
return 0;
ACEOF
my $conftest = $self->lang_build_program( $options->{prologue}, $body
);
+ my $have_member = $self->compile_if_else($conftest);
+
+ unless ($have_member)
+ {
+ $body = <<ACEOF;
+ static $type check_aggr;
+ if( sizeof check_aggr.$member )
+ return 0;
+ACEOF
+ $conftest = $self->lang_build_program( $options->{prologue}, $body
);
+ $have_member = $self->compile_if_else($conftest);
+ }
+
+ $have_member
+ and $options->{action_on_true}
+ and ref $options->{action_on_true} eq "CODE"
+ and $options->{action_on_true}->();
+
+ $options->{action_on_false}
+ and ref $options->{action_on_false} eq "CODE"
+ and $options->{action_on_false}->()
+ unless $have_member;
- my $have_member = $self->compile_if_else(
- $conftest,
- {
- ( $options->{action_on_true} ? ( action_on_true =>
$options->{action_on_true} ) : () ),
- ( $options->{action_on_false} ? ( action_on_false =>
$options->{action_on_false} ) : () )
- }
- );
$self->define_var(
_have_member_define_name("$type.$member"),
$have_member ? $have_member : undef,
@@ -2234,7 +2265,7 @@
my $have_members = 0;
foreach my $member (@$members)
{
- $have_members |= (
+ $have_members |= (
$self->check_member(
$member,
{
@@ -3217,7 +3248,7 @@
=head2 check_pureperl_required
-This check method proves whether a pureperl build is wanted or not by
+This check method proves whether a pure perl build is wanted or not by
cached-checking C<< $self->_check_pureperl_required >>.
=cut
@@ -3238,7 +3269,7 @@
=item *
-check pureperl environment variables (L</check_pureperl_required>) or
+check pure perl environment variables (L</check_pureperl_required>) or
command line arguments and return false when pure perl is requested
=item *
@@ -3266,7 +3297,8 @@
scalar @_ > 1 and ref $_[-1] eq "HASH" and $options = pop @_;
my $self = shift->_get_instance;
$self->check_pureperl_required() and return _on_return_callback_helper( 0,
$options, "action_on_false" );
- eval { $self->check_valid_compilers( $_[0] || [qw(C)] ) } or return
_on_return_callback_helper( 0, $options, "action_on_false" );
+ eval { $self->check_valid_compilers( $_[0] || [qw(C)] ) }
+ or return _on_return_callback_helper( 0, $options, "action_on_false" );
# XXX necessary check for $Config{useshrlib}? (need to dicuss with eg.
TuX, 99% likely return 0)
$self->check_compile_perlapi_or_die();
@@ -3697,7 +3729,7 @@
=item * CPAN Ratings
-L<http://cpanratings.perl.org/l/Config-AutoConf>
+L<http://cpanratings.perl.org/dist/Config-AutoConf>
=item * MetaCPAN
@@ -3719,7 +3751,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2004-2015 by the Authors
+Copyright 2004-2016 by the Authors
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/List-MoreUtils-0.413/lib/List/MoreUtils/Contributing.pod
new/List-MoreUtils-0.415/lib/List/MoreUtils/Contributing.pod
--- old/List-MoreUtils-0.413/lib/List/MoreUtils/Contributing.pod
2015-04-07 13:11:16.000000000 +0200
+++ new/List-MoreUtils-0.415/lib/List/MoreUtils/Contributing.pod
2016-04-13 11:49:37.000000000 +0200
@@ -79,7 +79,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2015 by Jens Rehsack
+Copyright 2015,2016 by Jens Rehsack
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.4 or,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/lib/List/MoreUtils/PP.pm
new/List-MoreUtils-0.415/lib/List/MoreUtils/PP.pm
--- old/List-MoreUtils-0.413/lib/List/MoreUtils/PP.pm 2015-06-10
15:06:12.000000000 +0200
+++ new/List-MoreUtils-0.415/lib/List/MoreUtils/PP.pm 2016-05-01
18:47:00.000000000 +0200
@@ -4,7 +4,7 @@
use strict;
use warnings;
-our $VERSION = '0.413';
+our $VERSION = '0.415';
=pod
@@ -576,7 +576,7 @@
Copyright 2004 - 2010 by Tassilo von Parseval
-Copyright 2013 - 2015 by Jens Rehsack
+Copyright 2013 - 2016 by Jens Rehsack
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.4 or,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/lib/List/MoreUtils/XS.pm
new/List-MoreUtils-0.415/lib/List/MoreUtils/XS.pm
--- old/List-MoreUtils-0.413/lib/List/MoreUtils/XS.pm 2015-06-10
15:06:12.000000000 +0200
+++ new/List-MoreUtils-0.415/lib/List/MoreUtils/XS.pm 2016-05-01
18:47:00.000000000 +0200
@@ -8,7 +8,7 @@
BEGIN
{
- $VERSION = '0.413';
+ $VERSION = '0.415';
# Load the XS at compile-time so that redefinition warnings will be
# thrown correctly if the XS versions of part or indexes loaded
@@ -70,7 +70,7 @@
Copyright 2004 - 2010 by Tassilo von Parseval
-Copyright 2013 - 2015 by Jens Rehsack
+Copyright 2013 - 2016 by Jens Rehsack
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.4 or,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/lib/List/MoreUtils.pm
new/List-MoreUtils-0.415/lib/List/MoreUtils.pm
--- old/List-MoreUtils-0.413/lib/List/MoreUtils.pm 2015-06-10
15:06:11.000000000 +0200
+++ new/List-MoreUtils-0.415/lib/List/MoreUtils.pm 2016-05-01
18:47:00.000000000 +0200
@@ -6,7 +6,7 @@
BEGIN
{
- our $VERSION = '0.413';
+ our $VERSION = '0.415';
}
use Exporter::Tiny qw();
@@ -783,7 +783,7 @@
=item * RT: CPAN's request tracker
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=List-MoreUtils>
+L<https://rt.cpan.org/Dist/Display.html?Name=List-MoreUtils>
=item * AnnoCPAN: Annotated CPAN documentation
@@ -791,7 +791,11 @@
=item * CPAN Ratings
-L<http://cpanratings.perl.org/l/List-MoreUtils>
+L<http://cpanratings.perl.org/dist/List-MoreUtils>
+
+=item * MetaCPAN
+
+L<https://metacpan.org/release/List-MoreUtils>
=item * CPAN Search
@@ -949,7 +953,7 @@
Copyright 2004 - 2010 by Tassilo von Parseval
-Copyright 2013 - 2015 by Jens Rehsack
+Copyright 2013 - 2016 by Jens Rehsack
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.4 or,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/List-MoreUtils-0.413/t/lib/LMU/Test/Functions.pm
new/List-MoreUtils-0.415/t/lib/LMU/Test/Functions.pm
--- old/List-MoreUtils-0.413/t/lib/LMU/Test/Functions.pm 2015-03-23
11:47:51.000000000 +0100
+++ new/List-MoreUtils-0.415/t/lib/LMU/Test/Functions.pm 2016-04-13
11:12:29.000000000 +0200
@@ -499,6 +499,9 @@
}
);
is_dying( sub { &after( 42, 4711 ); } );
+
+ @x = ( 1, after { /foo/ } qw(abc def) );
+ is_deeply(\@x, [ 1 ], "check XS implementation doesn't mess up stack");
}
# In the following, the @dummy variable is needed to circumvent
@@ -788,48 +791,28 @@
my @a = ( 1, 2, 3, 4, 5 );
my @b = ( 2, 4, 6, 8, 10 );
my @c = pairwise { $a + $b } @a, @b;
- is( is_deeply( \@c, [ 3, 6, 9, 12, 15 ] ), 1, "pw1" );
+ is_deeply( \@c, [ 3, 6, 9, 12, 15 ], "pw1" );
@c = pairwise { $a * $b } @a, @b; # returns (2, 8, 18)
- is( is_deeply( \@c, [ 2, 8, 18, 32, 50 ] ), 1, "pw2" );
+ is_deeply( \@c, [ 2, 8, 18, 32, 50 ], "pw2" );
# Did we modify the input arrays?
- is( is_deeply( \@a, [ 1, 2, 3, 4, 5 ] ), 1, "pw3" );
- is( is_deeply( \@b, [ 2, 4, 6, 8, 10 ] ), 1, "pw4" );
+ is_deeply( \@a, [ 1, 2, 3, 4, 5 ], "pw3" );
+ is_deeply( \@b, [ 2, 4, 6, 8, 10 ], "pw4" );
# $a and $b should be aliases: test
@b = @a = ( 1, 2, 3 );
@c = pairwise { $a++; $b *= 2 } @a, @b;
- is( is_deeply( \@a, [ 2, 3, 4 ] ), 1, "pw5" );
- is( is_deeply( \@b, [ 2, 4, 6 ] ), 1, "pw6" );
- is( is_deeply( \@c, [ 2, 4, 6 ] ), 1, "pw7" );
-
- # Test this one more thoroughly: the XS code looks flakey
- # correctness of pairwise_perl proved by human auditing. :-)
- sub pairwise_perl (&\@\@)
- {
- no strict;
- my $op = shift;
- local ( *A, *B ) = @_; # syms for caller's input arrays
-
- # Localise $a, $b
- my ( $caller_a, $caller_b ) = do
- {
- my $pkg = caller();
- \*{ $pkg . '::a' }, \*{ $pkg . '::b' };
- };
+ is_deeply( \@a, [ 2, 3, 4 ], "pw5" );
+ is_deeply( \@b, [ 2, 4, 6 ], "pw6" );
+ is_deeply( \@c, [ 2, 4, 6 ], "pw7" );
+
+ # sub returns more than two items
+ @a = ( 1, 1, 2, 3, 5 );
+ @b = ( 2, 3, 5, 7, 11 );
+ @c = pairwise { ($a) x $b } @a, @b;
+ is_deeply( \@c, [ (1) x 2, (1) x 3, (2) x 5, (3) x 7, (5) x 11 ], "pw8" );
- # Loop iteration limit
- my $limit = $#A > $#B ? $#A : $#B;
-
- # This map expression is also the return value.
- local ( *$caller_a, *$caller_b );
- map {
- # Assign to $a, $b as refs to caller's array elements
- ( *$caller_a, *$caller_b ) = \( $A[$_], $B[$_] );
- $op->(); # perform the transformation
- } 0 .. $limit;
- }
( @a, @b ) = ();
push @a, int rand(1000) for 0 .. rand(1000);
@@ -838,14 +821,17 @@
{
local $SIG{__WARN__} = sub { }; # XXX
my @res1 = pairwise { $a + $b } @a, @b;
- my @res2 = pairwise_perl { $a + $b } @a, @b;
- ok( is_deeply( \@res1, \@res2 ) );
+ # Test this one more thoroughly: the XS code looks flakey
+ # correctness of pairwise_perl proved by human auditing. :-)
+ my $limit = $#a > $#b ? $#a : $#b;
+ my @res2 = map { $a[$_] + $b[$_] } 0 .. $limit;
+ is_deeply( \@res1, \@res2 );
}
@a = qw/a b c/;
@b = qw/1 2 3/;
@c = pairwise { ( $a, $b ) } @a, @b;
- ok( is_deeply( \@c, [qw/a 1 b 2 c 3/] ) ); # 88
+ is_deeply( \@c, [qw/a 1 b 2 c 3/], "pw map" );
SKIP:
{
@@ -1217,6 +1203,10 @@
ok( is_deeply( $part[1], [ 2, 5, 8, 11 ] ) );
ok( is_deeply( $part[2], [ 3, 6, 9, 12 ] ) );
+ $list[2] = 0;
+ is( $part[2][0], 3, 'Values are not aliases' );
+
+ @list = 1 .. 12;
@part = part { 3 } @list;
is( $part[0], undef );
is( $part[1], undef );
@@ -1226,7 +1216,7 @@
eval {
@part = part { -1 } @list;
};
- ok( $@ =~ /^Modification of non-creatable array value attempted, subscript
-1/ );
+ like( $@, qr/^Modification of non-creatable array value attempted,
subscript -1/ );
$i = 0;
@part = part { $i++ == 0 ? 0 : -1 } @list;
@@ -1286,6 +1276,7 @@
( $min, $max ) = minmax @list;
is( $min, 0 );
is( $max, 10001 );
+ $list[0] = 17;
# Some floats
@list = ( 0, -1.1, 3.14, 1 / 7, 10000, -10 / 3 );
@@ -1301,6 +1292,10 @@
is( $min, -1 );
is( $max, -1 );
+ # COW causes missing max when optimization for 1 argument is applied
+ @list = grep {defined $_ } map { my ($min, $max) = minmax(sprintf("%.3g",
rand)); ($min, $max) } (0..19);
+ is( scalar @list, 40, "minmax swallows max on COW" );
+
# Confirm output are independant copies of input
$input = 1;
is( $min, -1 );