[Bast-commits] r9999 - ironman/Perlanet-IronMan/tags/ironman/bin

idn at dev.catalyst.perl.org idn at dev.catalyst.perl.org
Mon Nov 12 15:27:42 GMT 2012


Author: idn
Date: 2012-11-12 15:27:42 +0000 (Mon, 12 Nov 2012)
New Revision: 9999

Modified:
   ironman/Perlanet-IronMan/tags/ironman/bin/ironman-collector.pl
Log:
Adding checks to cli_feed tests

Modified: ironman/Perlanet-IronMan/tags/ironman/bin/ironman-collector.pl
===================================================================
--- ironman/Perlanet-IronMan/tags/ironman/bin/ironman-collector.pl	2012-10-24 13:07:28 UTC (rev 9998)
+++ ironman/Perlanet-IronMan/tags/ironman/bin/ironman-collector.pl	2012-11-12 15:27:42 UTC (rev 9999)
@@ -76,12 +76,20 @@
 
 if($DEBUG) { print("Fetching the feed data\n"); }
 
+my $cli_feed_matched = 0;
+
 foreach my $feed_obj ( @{ $feeds_obj } ) {
 
     if(defined($cli_feed)) {
-        unless($feed_obj->url eq $cli_feed) {
+        unless(lc($feed_obj->url) eq lc($cli_feed)) {
+            print("Skipping '" . $feed_obj->url . "'\n");
             next;
         }
+        
+        if(lc($feed_obj->url) eq lc($cli_feed)) {
+            print("Matched feed specified - $cli_feed.\n");
+            $cli_feed_matched = 1;
+        }
     }
 
     if($DEBUG) { print("Feed object:\n"); print(Dumper($feed_obj)); }
@@ -103,3 +111,7 @@
     $p->render($post);
 }
 
+if(defined($cli_feed) && $cli_feed_matched == 0) {
+    print("ERROR: Failed to match the feed you specified.\n");
+    print("ERROR: Perhaps it's not what you think it is?\n");
+}




More information about the Bast-commits mailing list