Subject: | [PATCH] Multiple patches for plagger trunk |
Hi,
Here are patches for the plagger trunk:
* Fix support of multiple tags by using newer XML::Feed and calling
category in array context
* fix a test that loads XMLRPC::Lite unconditionally
* recent Text::Language::Guess dies if string is empty or undefined, not
guessed language is better than error
I really want to get commit bit.
--
Best regards, Ruslan.
Subject: | plagger-trunk-support_multiple_tags_in_feeds.patch |
=== lib/Plagger/Plugin/Aggregator/Simple.pm
==================================================================
--- lib/Plagger/Plugin/Aggregator/Simple.pm (revision 19345)
+++ lib/Plagger/Plugin/Aggregator/Simple.pm (local)
@@ -109,9 +109,8 @@
$entry->title(_u($e->title));
$entry->author(_u($e->author));
- my $category = $e->category;
- $category = [ $category ] if $category && (!ref($category) || ref($category) ne 'ARRAY');
- $entry->tags([ map _u($_), @$category ]) if $category;
+ my @category = $e->category;
+ $entry->tags([ map _u($_), @category ]) if @category;
# XXX XML::Feed doesn't support extracting atom:category yet
if ($remote->format eq 'Atom' && $e->{entry}->can('categories')) {
=== Makefile.PL
==================================================================
--- Makefile.PL (revision 19345)
+++ Makefile.PL (local)
@@ -35,7 +35,7 @@
requires('MIME::Types', 1.16);
requires('Net::DNS');
-requires('XML::Feed', 0.12);
+requires('XML::Feed', 0.41);
requires('XML::LibXML');
requires('XML::Atom', 0.23);
requires('XML::RSS::LibXML', 0.3002);
Subject: | plagger-trunk-XMLRPC-Lite_is_optional_fix_test.patch |
=== t/plugins/Filter-POPFile/base.t
==================================================================
--- t/plugins/Filter-POPFile/base.t (revision 19345)
+++ t/plugins/Filter-POPFile/base.t (local)
@@ -1,7 +1,9 @@
use strict;
use t::TestPlagger;
-use XMLRPC::Lite;
+eval { require XMLRPC::Lite; XMLRPC::Lite->import() };
+plan skip_all => "XMLRPC::Lite is not installed." if $@;
+
my $server = 'localhost:8081';
test_plugin_deps;
Subject: | plagger-trunk-text_lang_guess_die_on_empty_text.patch |
=== lib/Plagger/Plugin/Filter/GuessLanguage.pm
==================================================================
--- lib/Plagger/Plugin/Filter/GuessLanguage.pm (revision 19345)
+++ lib/Plagger/Plugin/Filter/GuessLanguage.pm (local)
@@ -70,6 +70,8 @@
sub guess_language {
my ($self, $text) = @_;
+ return unless defined $text && length $text;
+
my $code;
# xxx: just a quick hack. there may be a better way.