Skip Menu |
 

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

Report information
The Basics
Id: 118298
Status: open
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: KES [...] cpan.org
Cc:
AdminCc:

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



Subject: Implement 'any LIST', 'all LIST' constructions
Download (untitled) / with headers
text/plain 269b
Some times we just check TRUE and do not require bare { $_ }: any { $_ } @list all { $_ } @list It will be more handy to have same syntax as 'sort' has: sort SUBNAME LIST sort BLOCK LIST sort LIST So we can write: any @list all @list
Download (untitled) / with headers
text/plain 622b
On Sat Oct 08 06:46:26 2016, KES wrote: Show quoted text
> It will be more handy to have same syntax as 'sort' has: > > sort SUBNAME LIST > > sort BLOCK LIST > sort LIST
sort() can only do that because it has very special implementation in the perl core parser and interpreter, allowing it to take on multiple different personalities like that. Regular user functions like any/all with the (&@) prototype can't do that. Show quoted text
> So we can write: > > any @list > all @list
So I'm afraid this won't be easily possible without parser-level trickery, of the kind that would only be possible on 5.14+ with XS -- Paul Evans


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.