Skip to content
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

Add support for the cpanfile "mirror" values #473

Open
wants to merge 8 commits into
base: devel
Choose a base branch
from

Conversation

zebardy
Copy link
Contributor

@zebardy zebardy commented Aug 29, 2015

This patch should provide support for the cpanfile "mirror" values. The mirror values will be superseded by any mirror values that are set as command line parameters, but will be a higher priority than the default mirror value.

@miyagawa
Copy link
Owner

Thanks for the patch.

There are several reasons I didn't implement the support for mirror in cpanm, one of which was mirror needs to be able to group the requirements. (like with recent bundler).

mirror 'http://darkpan/' => sub { 
   requires ...
};

Or

mirror 'http://darkpan/';
requires ...

mirror 'http://www.cpan.org/';
requires ...

@zebardy
Copy link
Contributor Author

zebardy commented Aug 29, 2015

I see, the idea of source groups in gemfiles. Seems kind of neat. I guess the first step for that would be working out the syntax or structure for cpanfile and how Module::CPANfile would expose this. I'd also be curious about how this might support defining multiple mirrors for a grouping (probably a small edge case). However I would argue that mirror does not need to support the ability to group requirements, at least not at first. That the slice of functionality of supporting global mirrors in cpanfile, cpanm and carton is a worthwhile one.

While working on this patch I started down the path of considering the dependency specific mirror lists, which are inherited by it's dependencies reading cpanfiles if present in dependencies and merging them into it's mirror list. I think this would apply to scenarios such as this. However thats, getting way more ahead of ourselves and far more complicated than is strictly needed for the main use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants