Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
Perl::ToPerl6::Transformer::CompoundStatements::RewriteMapGreps - Format map{}, grep{}
AFFILIATION
This Transformer is part of the core Perl::ToPerl6 distribution.
DESCRIPTION
Perl6 unifies map{}
and grep{}
with the rest of the function calls, in that the first argument must be a block, and the arguments must be separated with commas. This transformer adds the block where needed, and inserts the comma as required:
map {$_++} @x; --> map {$_++}, @x;
map /x/ @x; --> map {/x/}, @x;
grep {$_++} @x; --> grep {$_++}, @x;
grep /x/ @x; --> grep {/x/}, @x;
CONFIGURATION
This Transformer is not configurable except for the standard options.
AUTHOR
Jeffrey Goff <drforr@pobox.com>
COPYRIGHT
Copyright (c) 2015 Jeffrey Goff
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.