The CPAN Testers Wiki  

Edsger Dijkstra:

"Program testing can be used to show the presence of bugs, but never to show their absence!"

CPAN + CPAN-Reporter Configuration

Interactive configuration

To configure or re-configure CPAN::Reporter, use the interactive configuration prompts from the CPAN shell:

cpan> o conf init test_report

This causes CPAN to begin with its configuration question of whether or not to generated test reports at all:

Email test reports if CPAN::Reporter is installed (yes/no)? yes 

Answering "yes" will then be followed with a series of configuration questions for CPAN::Reporter itself.

email_from? ["Your Name" <your_email@example.com>] 

If you have not configured CPAN::Reporter before, the default will be blank. Enter an email address that will be used as the "From" address to CPAN::Testers. This line will also be used to track how many submissions you've made at the CPAN Testers Statistics site.

Make sure what you enter is a valid email "From" line. Put the name in quotes if it has a period or other non-alphabetical character. Examples:

  • johndoe@example.com
  • John Doe
  • "John Q. Public"

Unless the email address provided matches an email address that is subscribed to the CPAN Testers mailing list, there could be a lengthy delay before a moderators approves your test report submission.

cc_author? [default:yes pass:no]

This question determines when a distribution author should be copied on a test report. Copies are sent to the author's registered CPAN address.

This configuration option takes a Grade-Action Pair? that specifies a test grade and a corresponding action that should be taken for a report with that grade. The example above means that the default action is to send a copy, but if the grade is PASS, then a copy will not be sent. These actions will happen automatically without any prompt to the user.

edit_report? [default:ask/no pass:no] 

This options controls whether or not the test report should be loaded into an editor before it is sent. In the example above, the default will cause CPAN::Reporter to prompt after tests runs and ask if the user wants to edit the report (and will show a default answer of "no"). However, for PASS reports, the report will not be edited.

send_report? [default:ask/yes pass:yes na:no] 

This controls whether the report should be sent at all and whether the user should be prompted before sending. In some cases, there is no point to sending a report to CPAN Testers at all. The default action above will cause CPAN::Reporter to prompt the user (with a default answer of "yes"), but PASS reports will be sent automatically without prompting and NA reports will be discarded automatically.

send_duplicates? [default:no] 

CPAN::Reporter keeps a history of reports sent to CPAN Testers in .cpanreporter/history.db. Each entry consists of the subject line, including the test grade, the distribution name and the Perl version. This option controls whether a report with a duplicate subject line should be sent. The default is not to send duplicates.

smtp_server? mail.yourisp.net

By default, CPAN::Reporter will send test reports directly to the perl.org mail servers. However, many ISP's block outbound mail connections in order to reduce abuse by spammers. Usually, an ISP will provide an outbound mail server that will send mail on a user's behalf. This option sets the name of an outbound mail-server. For *nix machines that run their own mail servers, "localhost" should also work.

In at least one case, an ISP's outbound mail server has rejected emails that did not have a "From" address for an account with that ISP, so the email_from option may have to be set to an email address provided by the ISP.

Manual configuration and advanced options

The configuration file is located in .cpanreporter/config.ini in the user's home directory or "My Documents" directory on Windows.

The configuration is in ".ini" style (using Config-Tiny). Configuration options and values are just separated by an equals sign (spaces around the equals sign are optional):

smtp_server = mail.yourisp.net 

In addition to the options set during interactive configuration, the following options may be added manually to the configuration file as well:

  • email_to = <email address> -- alternate destination for reports instead of cpan-testers@perl.org; used for testing
  • editor = <editor> -- editor to use to edit the test report; if not set, CPAN::Reporter will use environment variables VISUAL, EDITOR or EDIT (in that order) to find an editor
  • debug = <boolean> -- turns debugging on/off

After setting any of these options manually, during subsequent interactive configurations, CPAN::Reporter will also prompt for changes to any advanced options detected.
                                                                                                                                                                                                                                                                                                           

Search

Help

WikiFormat
People

Contact

If you wish to contact me, you can send email to <barbie at missbarbell dot co dot uk>.

Perl Promotions

Ads provide by
The Perl Community AdServer