cpanm-reporter - send cpanm output to CPAN Testers
New to CPAN Testers' reporting? No problem! Just run:
> cpanm-reporter --setup
And we will walk you through everything you need :)
(if you already use CPAN::Reporter, you can safely skip the setup)
Call cpanm as you normally would:
> cpanm Moose Catalyst::Runtime Data::Printer ...
then, just call cpanm-reporter to report results:
Or, if you performed a few installs (called cpanm more than once) and wish to report them all:
> cpanm-reporter --all
See also some more advanced options below.
--version Shows version number and exits
--help Shows basic usage help and exits
--build_dir=PATH Where your build directory is, containing
each dist's subdir. Default:
--build_logfile=PATH Report results based on this specific build.log.
By default: $BUILD_DIR/build.log is checked.
--all (or -a) Report all recent installations, not only the
last one. Use if you called cpanm a few times
before spawning cpanm-reporter.
--max_age=AGE Max age (in minutes) of reports which may
be processed. See remarks below. Default: 30.
--force Process reports even if they are too old.
--verbose (or -v) Extra output
--quiet (or -q) As little output as possible (voids -v)
--setup Sets up the CPAN Testers configuration for you
--only=A::B,C::D,... Only send reports for these modules
--exclude=A::B,... Don't send reports for these modules
--dry-run Prepare, but do not actually send reports
--skip-history Do not read nor write to the history file
--ignore-versions Do not check if build perl version differs from the runtime
This app properly parses the output of cpanm (build.log) to automatically generate and send reports to the CPAN Testers database.
cpanm has quickly become one of the most used CPAN clients out there, but it doesn't come with a native way to generate and send test reports to the CPAN Testers infrastructure. This standalone app is able to interact with your cpanm after you install a module, and do that for you.
You can use configuration files with different names and locations by setting the following environment variables:
The base directory in which your 'config.ini' file resides. Defaults to your home directory (if you're using Linux or OS X) or to the 'my documents' folder (if you're running Windows).
In case you don't want to change just the base directory but the entire file's path and name, you can set this variable to point at the new 'config.ini' file.
If you called cpanm-reporter --setup, you can also set PERL_MM_USE_DEFAULT to true and it will answer any prompted question automatically with its default value, if possible.
This is a standalone tool that reads cpanm's build.log file, meaning it can potentially be run any time after cpanm has done its thing. As such, you must be cautious to only run this tool right after you run cpanm, otherwise your whole environment may have changed, rendering the report useless - maybe even turning it into a disservice.
As such, we will *only* parse build.log files last modified up to 30 minutes before. You can override this by passing the --max_age=... option or the --force flag to cpanm-reporter, but please take good care to avoid sending bogus reports.
cpanm currently does not record the output into your build.log file if you pass the "verbose" argument to it, either --verbose or -v. If you used those when installing dists, cpanm-reporter won't find anything to send :(
cpanm-reporter is an external, auxiliary tool to cpanm. Since they're not attached, you must take care not to change perls or local-libs between installing distributions with cpanm and generating/sending the reports with cpanm-reporter. If you're not a power user, you don't have to worry about this. Just remember to run cpanm-reporter immediately after cpanm and everything will be fine :)
As an added precaution, cpanm-reporter will skip build.log entries in which the Perl version recorded in the build.log is different than the Perl version that is generating the report. The entries will be skipped silently unless the --verbose or -v flag is passed. This version check can be ignored by passing the --ignore-versions flag to cpanm-reporter. Obviously, this is discouraged since it would result in the sending of bogus reports.
Breno G. de Oliveira <email@example.com>
Copyright (c) 2012-2023, Breno G. de Oliveira <firstname.lastname@example.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install App::cpanminus::reporter, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.