-
Notifications
You must be signed in to change notification settings - Fork 49
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 for pulling prerequisites described in a cpanfile. #144
base: master
Are you sure you want to change the base?
Conversation
Pull requires targets. Add a test for being called w/out any and check the exception that gets thrown.
Add an optional argument to the Pull action that names a cpanfile. 1. loads the file using Module::CPANfile, 2. merges prerequisites from the phases = qw(configure build test runtime develop) and the types = qw(requires recommends suggests) 3. and uses the resulting requirements to add packages to the set of targets to be pulled. Targets are no longer required (in the Moose attribute sense) so add a test to make sure that we still correctly handle not having any.
I see: |
ps. There's an obvious fancier step of adding command line switches to explicitly specify phase/type. Not sure if it's worth it, whether it's better to specify e.g. "test and everything below" or name each individually, etc... Wait for a use case.... |
This looks great. Try it for a while and then we can think about merging it. Lately, I've been looking into extending Pinto to support Ruby and/or Python. So I might prefer to put this in a separate command, since it is very Perl-specific. But we'll cross that bridge when we get to it. |
Add a --cpanfile option to the pull command. Option currently requires a value. TODO supply a default value of 'cpanfile'. I had to "enhance" the way that arg_attribute and args_from_stdin work. Prior to this change they had no information about the context in which they were running and just returned constants. Now they are passed the $opts and $args from above and can decide whether the Action should collect stuff from stdin or not. In this case, if a cpanfile is specified then there should be no additional args, either on the command line or on stdin.
Some thoughts... If we add Supporting Either way, the solution is to create a custom I see that you also had to tweak some stuff up in Down the road, it will probably make sense to have options that affect what Pinto does with respect to prereqs for different phases (e.g. |
Hi Jeff,
Here's a first cut at support for reading prerequisites from a cpanfile.
I ended up slipping it into the Pull action, it seemed to be minimally disruptive and I couldn't bring myself to cut-and-paste the rest of the Pull stuff.
Added a test to make sure that handling no targets and no cpanfile does the right thing and added a bunch of tests for various cpanfile monkeyshines. I'm not entirely sure that I'm using the test stuff to its fullest potential.
Comments, please.