Monday, September 20, 2010

convert to CPAN Testers 2.0 (CPANTS)

I woke up to find a bevy of "Mail Delivery Failure" messages in my inbox. Seems the cpan-test reports I emailed in bounced back because cpan tester 2.0 dropped support of incoming email reports in favor of http. I'm excited to hear about this http switch, as I hated not being able to send test reports from machines that lacked email configurations.
This message was created automatically by the mail system (ecelerity).

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

>>> (after RCPT TO): 550 cpan-testers no longer accepts test submissions via email. Please convert to CPAN Testers 2.0 and the http submission method. Instructions are at:

Let's follow the wiki article: and get upgraded!

Upgrade steps for a current CPAN::Reporter user:

  1. Upgrade CPAN::Reporter, add Test::Reporter::Transport::Metabase module
    # check current version:
    % perl -MCPAN::Reporter -l -e 'print $CPAN::Reporter::VERSION'
    % cpanm CPAN::Reporter
    Successfully installed CPAN::Reporter
    % cpanm Test::Reporter::Transport::Metabase
    Successfully installed Test-Reporter-Transport-Metabase-1.999008
  2. create a profile using 'metabase-profile', put it into location.
    % metabase-profile
    Enter full name: ...
    Enter email address: ...
    Enter password/secret: ...
    Writing profile to 'metabase_id.json'
    % mkdir ~/.cpantesters
    % mv metabase_id.json ~/.cpantesters
    % chmod 400 ~/.cpantesters/metabase_id.json
  3. upgrade my ~/.cpanreporter/config.ini file to add a transport line
    #add transport line to my ~/.cpanreporter/config.ini file
    % echo 'transport = Metabase uri id_file ~/.cpantesters/metabase_id.json' >> ~/.cpanreporter/config.ini
  4. Test
    cpan Hadoop::Streaming
    CPAN::Reporter: Test result is 'pass', All tests successful.
    CPAN::Reporter: preparing a CPAN Testers report for Hadoop-Streaming-0.102520
    CPAN::Reporter: ssending test report with 'pass' via Metabase
  5. Verify Test : Check metabase tail log for my entry.
    % wget --quiet -O- | grep -i grangaard
    [2010-09-20T20:47:06Z] [Andrew Grangaard] [pass] [SPAZM/Hadoop-Streaming-0.102520.tar.gz] [i486-linux-gnu-thread-multi] [perl-v5.10.1] [3acd2e9e-c4f8-11df-b898-64160c3e84b1] [2010-09-20T20:47:06Z]
Dr. Frankenstein, It lives!

No comments: