cpan testing and JavaScript::RPC 0.02

LTjake on 2004-01-18T22:34:28

I've finally setup one of my servers as a cpan smoke testing box. A few notes on the process:

  • installing CPANPLUS was dirt simple.
  • using Mail::POP3Client i was able to setup a simple script to parse mail from the cpan-testers list (updated capture regex - thanks jplindstrom && autrijus!)

use strict;
use Mail::POP3Client;

my $pop3 = new Mail::POP3Client(
    USER => 'myusername',
    PASSWORD => 'mypassword',
    HOST => 'mail.host.com'
);

for my $i ( 1..$pop3->Count ) {
    for( $pop3->Head( $i ) ) {
        fork || exec( "sleep 40000 && cpansmoke -aps $1 >/dev/null 2>&1" ) if /^Subject: CPAN Upload: ([-.\/\w]+)$/;
    }
    $pop3->Delete( $i );
}

$pop3->Close;

  • Run the script at least hourly, if not more frequent. Otherwise you'll get too many fork()s at once.
  • In order to report tests to the cpan-testers list, you MUST have Test::Reporter installed. Duh.

So, if you see a report from cpansmoke@alternation.net, it's mine.

Like i mentioned in my last post, i can change my mind at any time. So, i've put out JavaScript::RPC::Server::CGI as a module that needs to be subclassed. Inkdroid and I both thought it was nicer.


Danger?

jplindstrom on 2004-01-18T23:51:55

Is it wise to exec a (.*)-match just like that?

Re:Danger?

autrijus on 2004-01-19T00:23:14

Probably unwise. The fault is mine.

It should capture ([-./\w]+) instead.

Changed in TesterGuide.pod, thanks!