Subject: | no_pass rss by Theory |
--- lib/CPAN/WWW/Testers.pm.orig 2008-03-09 19:06:45.000000000 -0700
+++ lib/CPAN/WWW/Testers.pm 2008-03-09 19:10:58.000000000 -0700
@@ -277,6 +277,11 @@
print "Writing $destfile\n";
overwrite_file( $destfile->stringify,
_make_rss_author( $author, \@reports ) );
+
+ $destfile = file( $directory, 'author', $author . "-nopass.rss" );
+ print "Writing $destfile\n";
+ overwrite_file( $destfile->stringify,
+ _make_rss_author_nopass( $author, \@reports ) );
}
}
@@ -710,11 +715,12 @@
}
sub _make_rss_author {
- my ( $author, $reports ) = @_;
+ my ( $author, $reports, $prefix ) = @_;
my $rss = XML::RSS->new( version => '1.0' );
+ $prefix ||= '';
$rss->channel(
- title => "Reports for distributions by $author",
+ title => "${prefix}Reports for distributions by $author",
link => "http://testers.cpan.org/author/$author.html",
description => "Reports for distributions by $author",
syn => {
@@ -740,6 +746,13 @@
return $rss->as_string;
}
+sub _make_rss_author_nopass {
+ my ( $author, $reports ) = @_;
+ my @nopass = grep { $_->{status} ne 'PASS' } @$reports;
+ _make_rss_author( $author, \@nopass, 'Failing ' );
+}
+
+
1;
__END__