-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support -M and -m options equivalent to perl's for all ops with snippets #23
Conversation
OUTPUT | ||
App::RecordStream::Test::OperationHelper->do_match( | ||
'xform', | ||
['-MList::Util=reduce', '{{reduced}} = reduce { $a * $b } map { (my $tmp = $_) =~ s/\D//g; $tmp } values %$r'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely cool with having this test here, but we should definitely add this test to Executor.t itself, or an equivalent test... I'm totally cool with this exact test over there...
thanks so much for doing this, I think this is definitely a cool feature! Just a few documentation / style comments... recs has a pretty extensive help system that we like to keep in tip top shape :) I'm impressed you were able to find you're way all the way through the codebase, thanks for contributing! |
Thanks for the suggestions, I'll implement them tonight or tomorrow. I actually found a bug when I expanded the tests for -M/-m just now, so I have a fix for that too! |
awesome! looking forward to it! |
A very useful convenience, for example: recs-grep -MList::MoreUtils=any -e 'any { {{Name}} eq $_ } qw(foo bar bat)' The symantics of -M/-m match the documented behaviour in perlrun and the produced Perl syntax. Getopt bundling is required for -MFoo=bar to work, otherwise an error is thrown regarding unknown option "-MFoo". Note that, for the time being, use of -M requires explicit use of -e/-E.
List::Util is core since 5.7.3.
Executor's help is only used by xform, for now.
xform includes it already.
Force pushed the branch with new and improved commits. They address your suggestions and also fix a bug with |
Support -M and -m options equivalent to perl's for all ops with snippets
merged! |
Woo! Thanks! On 12/24/2013 04:23 PM, Ben Bernard wrote:
|
No description provided.