Improve support for optional feature
Opened this issue · 0 comments
Currently cpm
supports --feature
to enable some optional features of a module that is being installed.
cpanm
has a slightly different set of related CLI options, namely --with-feature, --without-feature, --with-all-features
.
I find these flags especially useful during automated testing scenarios, when one might need to run test cases with all features enabled, or just specific ones disabled.
For example in one of the project I'm involved in, there are 6 different optional features pulling in additional dependencies. On Linux and Mac OS all features can be supported, so
cpanm --installdeps --with-all-features
can be used. However on Windows, 2 of these features can't be supported, so
cpanm --installdeps --with-all-features --without-feature=feat1 --without-feature=feat2
has to be used.
I feel it would be nice to be closer to cpanm
behavior in these terms, and I haven't found a convenient way to replicate the same approach with cpm
yet.