gugod / App-perlbrew

Manage perl installations in your $HOME
https://perlbrew.pl
Other
719 stars 216 forks source link

for some cpanm-installed modules, list-modules only shows the binary #720

Closed stuart-little closed 3 years ago

stuart-little commented 3 years ago

As a concrete example, I habitually install App::Ack with the perlbrew-installed cpanm (i.e. after running perlbrew install-cpanm).

The problem: perlbrew list-modules does not show App::Ack. Instead, all it sees is the binary ack. This does not exist as a package, so then something like

$ perlbrew clone-modules old@lib new@lib

inevitably fails to install App::Ack because the latter is simply not listed. Instead, I get a message that cpanm has tried to find ack (the binary!) and couldn't:

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

Of course, the other option for reinstalling modules doesn't work either:

perlbrew list-modules | perlbrew exec --with new@lib cpanm

will fail for the same reason that App::Ack is not listed by the first command.

I'm not sure what the root cause of this is: is it a perlbrew issue or a cpanm problem? Does cpanm itself somehow fail to properly register App::Ack as an installed package?

gugod commented 3 years ago

A solution is being implemented. See also some notes at #722