List-Comprehensions
view release on metacpan or search on metacpan
lib/List/Comprehensions.pm view on Meta::CPAN
}
=item B<comp1(&@)>
Anonymous comprehensions (slighly faster)
comp1 sub { }, arg, [arg]
arg: array ref | guard subs
=cut
sub comp1(&@) {
local $code = shift;
local @guards;
local @sets;
local @args;
for my $a (@_) {
if( ref($a) ) {
if( ref($a) eq 'CODE' ) {
push @guards, $a;
}
lib/List/Comprehensions.pm view on Meta::CPAN
}
=item B<comp2(&@)>
Named comprehensions
comp2 sub { }, arg, [arg]
arg: [name => ] array ref | guard subs
=cut
sub comp2(&@) {
local $code = shift;
local @guards;
local @sets;
local @args;
my @aliases;
my %aliased;
my $their_lexicals = peek_my(1);
my %overridden_lexicals = ();
( run in 0.718 second using v1.01-cache-2.11-cpan-49f99fa48dc )