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

Support all phases supported by cpanfile #502

Open
evoyy opened this issue May 19, 2016 · 5 comments
Open

Support all phases supported by cpanfile #502

evoyy opened this issue May 19, 2016 · 5 comments

Comments

@evoyy
Copy link

evoyy commented May 19, 2016

cpanfile specifies:

on $phase => sub { ... };

Describe requirements for a specific phase. Available phases are configure, build, test, runtime and develop.

However, cpanm only provides switches for configure and develop phases:

--with-configure
--with-develop

Will it be possible to install dependencies for the other phases (build, test, runtime)? I was expecting to find a switch --with-test.

@miyagawa
Copy link
Owner

test is dictated by the --notest option, and build is required anyway if you try to build a module. There's no way you can install a module without 'build' modules.

@evoyy
Copy link
Author

evoyy commented May 19, 2016

My use case: I want to install all dependencies except the dependencies required by my test suite. So in development build I would run:

cpanm -L perl5 --installdeps --with-test .

and in production:

cpanm -L perl5 --installdeps .

This means my production build is slightly smaller.

@miyagawa
Copy link
Owner

You just run --notest in production and it would accomplish what you need?

@miyagawa
Copy link
Owner

Oh, I guess it will still install the test group. It came up as a requirement from Travis CI when they want to skip testing the dependencies but still needs to install the test group. Ugh.

@ylavoie
Copy link

ylavoie commented May 17, 2017

I faced the same problem as evoyy. cpanfile would be much more precise if I could put dependencies where they really belong. Currently, I have to stash test dependencies in develop for Travis to work and it is confusing for they do not belong in develop.

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

No branches or pull requests

3 participants