cpantimes
OK, so I decided to hack in support for submitting CPAN testers reports into cpanminus. I've uploaded the result to CPAN in case anybody else wants to use it. After CPANPLUS and cpanminus, the logical name for it was cpantimes.
Here's how to use it...
- Install cpantimes using your current CPAN client. You will also want Test::Reporter and Test::Reporter::Transport::Metabase.
$ cpanm App::cpantimes Test::Reporter Test::Reporter::Transport::Metabase - Set up a Metabase profile. You will need this in order for your reports to be accepted by CPAN testers.
$ metabase-profile
...
$ mkdir $HOME/.cpantesters
$ mv metabase_id.json $HOME/.cpantesters
$ chmod 400 $HOME/.cpantesters/metabase_id.json - Now just use cpant whenever you'd normally use cpanm. Test reports will be silently submitted every time you install a distribution. You can even set up a shell alias so that when you type cpanm you get cpantimes.
cpantimes is still at a very early stage of development. I literally started it yesterday evening. But have a play and let me know if you discover any bugs.
Why a fork?
Are you now going to sync up with cpanminus on every release? Wouldn't that be a hassle and error prone?
Fatpacking complicates things; the cpant script contains a full, unmodified copy of App::cpanminus::script, as well as App::cpantimes::script, which is a subclass of it, overriding just a few methods.
So syncing should just be a matter of grabbing the latest copy of App::cpanminus::script from the cpanminus repo, re-fatpacking cpant, and building the distro.
I'm no masochist; I've tried to do this the least painful way possible.
Thanks. That sounds really nifty. I shall give it a go shortly.
If
Test::Reporter
andTest::Reporter::Transport::Metabase
are required, why not mark them as prereqs inApp::cpantimes
, so they get installed automatically?Great job!
My two cents: the non-verbosity of cpantimes make it hard to figure out if it is actually working, so I'd mention http://metabase.cpantesters.org/tail/log.txt as a debug aid.
They are needed to send reports but they're not actually required. If they're unavailable, cpantimes will complain loudly but still install packages.
This way you can actually use cpant to install its own "prerequisites". :-)
If there's an error sending a report, then you should get a stack trace dumped to STDERR.
It would be nice to also mention successfully sending a report. They annoying thing is that the test is run after cpanminus has printed "Building and testing $dist ..." but before it prints "OK\n". So if I want cpantimes to print anything, it needs to be between them. :-(
Ideas for a good way to proceed would be welcome.
This is really great!
Since cpanminus, one of the few reasons I still use CPAN.pm at all is to send test reports for dists that unexpectedly fail.
Have you checked with miyagawa on getting this functionality into cpanm? Perhaps as a plugin? (I remember that cpanm was going to support plugins at one point but it looks like those plans were put aside some time ago)
It would be *very* useful indeed to print the URL of the submitted report.