miyagawa / cpanminus

cpanminus - get, unpack, build and install modules from CPAN
http://cpanmin.us
746 stars 213 forks source link

cpanm needs to glob() arguments on Windows #657

Closed DrHyde closed 1 year ago

DrHyde commented 1 year ago

In the CI for one of my modules I needed to use cpanm to install from a tarball on Windows, where I don't know what the tarball is called. On a sane OS, you do that with cpanm *.tar.gz and ... job done.

But on Windows that gives errors:

! Finding *.tar.gz on cpanmetadb failed.
! Finding *.tar.gz () on metacpan failed.
! Finding *.tar.gz () on mirror http://www.cpan.org/ failed.
! Couldn't find module or a distribution *.tar.gz

My solution was to run perl -e "exec(q{cpanm}, map { glob($_) } @ARGV)" *.tar.gz instead, but I think it would be best if cpanm were to do the globbing itself if running on Windows.

miyagawa commented 1 year ago

I think you should use a real shell. adding features like this to cpanm is an unnecessary scope creep.