[Bps-public-commit] r16086 - CPAN2RT/lib

ruz at bestpractical.com ruz at bestpractical.com
Thu Sep 25 23:00:47 EDT 2008


Author: ruz
Date: Thu Sep 25 23:00:47 2008
New Revision: 16086

Modified:
   CPAN2RT/lib/CPAN2RT.pm

Log:
* filter versions earlier to avoid warnings

Modified: CPAN2RT/lib/CPAN2RT.pm
==============================================================================
--- CPAN2RT/lib/CPAN2RT.pm	(original)
+++ CPAN2RT/lib/CPAN2RT.pm	Thu Sep 25 23:00:47 2008
@@ -493,7 +493,7 @@
 sub add_versions {
     my $self = shift;
     my ($queue, @versions) = @_;
-    @versions = uniq @versions;
+    @versions = uniq grep defined && length, @versions;
 
     my @errors;
     foreach my $name ( "Broken in", "Fixed in" ) {
@@ -505,7 +505,7 @@
 
         # Unless it's a new value, don't add it
         my %old = map { $_->Name => 1 } @{ $cf->Values->ItemsArrayRef };
-        foreach my $version ( grep defined && length, @versions ) {
+        foreach my $version ( @versions ) {
             if ( exists $old{$version} ) {
                 debug { "Version '$version' exists (not adding)\n" };
                 next;



More information about the Bps-public-commit mailing list