When module installation fails
Edit Notice: I edited this post because of a very valid point made in brian's comment below.
I use perlbrew for managing my Perl installs as I am sure many people do. I was searching around metacpan for helper modules for perlbrew and found Bash::Completion::Plugins::perlbrew . I think this might be useful so I install it,
cpan Bash::Completion::Plugins::perlbrew
and I get a “don't know what it is.” error. I changed my cpan urllist to point to http://cpan.cpantesters.org and reloaded the index and still no dice. I am still unsure why this is not working so I decided to try installing just Bash::Completion and it fails during t/05-utils.t .
So now what do I do? I really do not need to install Bash::Completion::Plugins::perlbrew or Bash::Completion but I do not like how they failed to install. Time to submit a test report.
I found the process quite easy by following the test during install instructions.
cpan CPAN::Reporter Test::Reporter::Transport::Metabase Crypt::SSLeay
cpan
Inside the cpan shell:
cpan[1]> o conf init test_report
Then I answered these questions:
Email test reports if CPAN::Reporter is installed (yes/no)? [no] yes
email_from? [] example@example.com
smtp_server? []
edit_report? [default:ask/no pass/na:no]
send_report? [default:ask/yes pass/na:yes]
Then to save my settings:
cpan[1]> o conf commit
Exit from the CPAN shell, then add the following line to the ~/.cpanreporter/config.ini file:
transport = Metabase uri https://metabase.cpantesters.org/api/v1/ id_file ~/.cpantesters/metabase_id.json
Then:
mkdir ~/.cpantesters
cd ~/.cpantesters
metabase-profile
chmod 400 metabase_id.json
Now I am setup to submit reports so I tried to install Bash::Completion again. It once again did not work but I was now able to submit a report and I verified it by checking the recent log .
I started out not being able to install a module and now I am sending in test reports on module installs to help the developers. The point being that once again the Perl community has great tools in place for the end user to submit feedback to the developers.
There's no
install
command to the cpan command-line client.I don't know why this module isn't in the index, but if you know the path to a module, you can install it with the path:
$ cpan
$ cpan[1]> install R/RH/RHOELZ/Bash-Completion-Plugins-perlbrew-0.02.tar.gz
You might want to take a look at App::cpanminus for module installation. My module installing life has become a lot more painless since then.
Hi there!
I'm the author of Bash::Completion::Plugins::perlbrew; it looks like there was a mix up with the versions (my fault); I just uploaded a new tarball to PAUSE to try and remedy this. Please try again in a few hours.
Also, which OS are you on? I'd like to find out why you're having trouble installing Bash::Completion.
-Rob
Note the cpan commands above with the exception of the ones starting with the letter 'o' are from the bash prompt and not the cpan shell.
Thanks for tip about installing with the path brian. Also I did not know that 'cpan install Test::Most' and 'cpan Test::Most' did the same thing from bash.
If invoking like "cpan install module" is not a supported feature then I must be lucky using it wrong and still getting the results I want. Perl is doing what I mean and I like it.
I am using openSUSE 11.4 with perl 5.12.3. When I try to install Bash::Completion and it fails I get the following:
I try viewing the cpan-testers results with
reports MELO/Bash-Completion-0.001.tar.gz
and I get the following:
I tried getting the report with perl-5.12.4 and perl-5.14.1 provided by perlbrew and I still get the above errors.
It's not that you are lucky using `cpan install`; it's that I had to write special code to ignore an argument that was never a feature and people use despite it never having appeared in any documentation. It's a waste of your typing. Just type `cpan Module::Name`, and please don't pass on the idea that `install` does anything.
cpanminus doesn't magically fix indexing errors in PAUSE. :)
phred says:
The blog post you've commented on is about using CPAN::Reporter to report bugs in CPAN modules. But by glancing at the App::cpanminus documentation you might notice that App::cpanminus doesn't support this.
Hi,
regarding the failures with Bash-Completion, you should find version 0.002 on CPAN with those fixed.
Thanks for the push
FYI, the "duplicate report" warning is just telling you that CPAN::Reporter thinks it already sent a report with the "FAIL" grade for that distribution and won't sent another one.
The CPAN::Exception is a weird one. Please file a ticket on the CPAN.pm RT queue. Generally, with the volume of test reports now available, you might prefer to see a graphical view of test reports instead, e.g. http://matrix.cpantesters.org/?dist=Bash-Completion-Plugins-perlbrew%200.03
That is the "matrix" view -- there are links to it on both search.cpan.org and metacpan.org (the latter is just a matrix-looking character next to "Test Results").