[Bast-commits] r7383 - ironman/plagger/lib/Plagger/Plugin/Aggregator

szbalint at dev.catalyst.perl.org szbalint at dev.catalyst.perl.org
Tue Aug 25 10:17:30 GMT 2009


Author: szbalint
Date: 2009-08-25 10:17:28 +0000 (Tue, 25 Aug 2009)
New Revision: 7383

Modified:
   ironman/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm
Log:
Adding a fallback to author value for feeds that do not supply it in entry.

Let's fallback to the added feed title in the yaml config for cases where feeds
like RSS do not supply author tags.


Modified: ironman/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm
===================================================================
--- ironman/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm	2009-08-25 09:33:40 UTC (rev 7382)
+++ ironman/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm	2009-08-25 10:17:28 UTC (rev 7383)
@@ -107,7 +107,7 @@
     for my $e ($remote->entries) {
         my $entry = Plagger::Entry->new;
         $entry->title(_u($e->title));
-        $entry->author(_u($e->author));
+        $entry->author(_u($e->author) || _u($remote->author) || $feed->title );
 
         my $category = $e->category;
            $category = [ $category ] if $category && (!ref($category) || ref($category) ne 'ARRAY');




More information about the Bast-commits mailing list