Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 23863
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: Limbic_Region_2000 [...] Yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.18
Fixed in: (no value)



Subject: Bug (doc or implementation) with reduce() return values
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 389
Download (untitled) / with headers
text/plain 389b
The doc for reduce() says: Returns the result of the last call to BLOCK. It should either be explicitly documented to only return a single value or should be implemented to handle multiple return values my ($foo, $bar, $baz) = reduce {$hash{$arr[$a]} < $hash{$arr[$b]} ? ($a, $hash{$arr[$a]}, $arr[$a]) : ($b, $hash{$arr[$b]}, $arr[$b]) } grep defined($arr[$_]), 0 .. $#arr;
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-21744-1165669120-1405.23863-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 123
Download (untitled) / with headers
text/plain 123b
The documentation for the next release of List::Util have been changed to reflect that BLOCK is called in a scalar context


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.