r72993 - in /branches/upstream/libxml-rss-perl/current: Build.PL Changes MANIFEST META.yml examples/rss2html.pl lib/XML/RSS.pm t/2.0-parse-cloud.t t/test_manifest
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Thu Apr 21 18:15:47 UTC 2011
Author: periapt-guest
Date: Thu Apr 21 18:14:46 2011
New Revision: 72993
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=72993
Log:
[svn-upgrade] new version libxml-rss-perl (1.49)
Added:
branches/upstream/libxml-rss-perl/current/t/2.0-parse-cloud.t
Modified:
branches/upstream/libxml-rss-perl/current/Build.PL
branches/upstream/libxml-rss-perl/current/Changes
branches/upstream/libxml-rss-perl/current/MANIFEST
branches/upstream/libxml-rss-perl/current/META.yml
branches/upstream/libxml-rss-perl/current/examples/rss2html.pl
branches/upstream/libxml-rss-perl/current/lib/XML/RSS.pm
branches/upstream/libxml-rss-perl/current/t/test_manifest
Modified: branches/upstream/libxml-rss-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/Build.PL?rev=72993&op=diff
==============================================================================
--- branches/upstream/libxml-rss-perl/current/Build.PL (original)
+++ branches/upstream/libxml-rss-perl/current/Build.PL Thu Apr 21 18:14:46 2011
@@ -21,6 +21,10 @@
{
'Test::Manifest' => '0.9',
'Test::More' => 0,
+ },
+ configure_requires =>
+ {
+ 'Module::Build' => '0.36',
},
'license' => "perl",
dist_author => 'Shlomi Fish <shlomif at cpan.org>',
Modified: branches/upstream/libxml-rss-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/Changes?rev=72993&op=diff
==============================================================================
--- branches/upstream/libxml-rss-perl/current/Changes (original)
+++ branches/upstream/libxml-rss-perl/current/Changes Thu Apr 21 18:14:46 2011
@@ -1,4 +1,11 @@
Revision history for Perl module XML::RSS
+
+1.49 - April 7, 2011
+ - Some correctness and Modern Perl changes to the rss2html.pl
+ script (it still appears to be very hairy.)
+ - Add support for parsing rssCloud:
+ - https://rt.cpan.org/Ticket/Display.html?id=67241
+ - Thanks to STUIFZAND for the patch.
1.48 - April 23, 2010
- Fix the $rss->parse($string)->other_method() display (had to add
Modified: branches/upstream/libxml-rss-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/MANIFEST?rev=72993&op=diff
==============================================================================
--- branches/upstream/libxml-rss-perl/current/MANIFEST (original)
+++ branches/upstream/libxml-rss-perl/current/MANIFEST Thu Apr 21 18:14:46 2011
@@ -48,6 +48,7 @@
t/2.0-generate.t
t/2.0-modules.t
t/2.0-parse-2.t
+t/2.0-parse-cloud.t
t/2.0-parse-self.t
t/2.0-parse.t
t/2.0-permalink.t
Modified: branches/upstream/libxml-rss-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/META.yml?rev=72993&op=diff
==============================================================================
--- branches/upstream/libxml-rss-perl/current/META.yml (original)
+++ branches/upstream/libxml-rss-perl/current/META.yml Thu Apr 21 18:14:46 2011
@@ -7,7 +7,7 @@
Test::More: 0
configure_requires:
Module::Build: 0.36
-generated_by: 'Module::Build version 0.3607'
+generated_by: 'Module::Build version 0.3617'
keywords:
- feed
- feeds
@@ -28,7 +28,7 @@
provides:
XML::RSS:
file: lib/XML/RSS.pm
- version: 1.48
+ version: 1.49
XML::RSS::Private::Output::Base:
file: lib/XML/RSS/Private/Output/Base.pm
XML::RSS::Private::Output::Roles::ImageDims:
@@ -54,4 +54,4 @@
homepage: http://perl-rss.sourceforge.net/
license: http://dev.perl.org/licenses/
repository: https://svn.perl.org/modules/XML-RSS/trunk
-version: 1.48
+version: 1.49
Modified: branches/upstream/libxml-rss-perl/current/examples/rss2html.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/examples/rss2html.pl?rev=72993&op=diff
==============================================================================
--- branches/upstream/libxml-rss-perl/current/examples/rss2html.pl (original)
+++ branches/upstream/libxml-rss-perl/current/examples/rss2html.pl Thu Apr 21 18:14:46 2011
@@ -15,6 +15,8 @@
# Declare variables
my $content;
my $file;
+
+binmode STDOUT, ":encoding(utf8)";
# MAIN
# check for command-line argument
@@ -42,12 +44,12 @@
}
# print the HTML channel
-&print_html($rss);
+print_html($rss);
# SUBROUTINES
sub print_html {
my $rss = shift;
- print <<HTML;
+ print <<"HTML";
<table bgcolor="#000000" border="0" width="200"><tr><td>
<TABLE CELLSPACING="1" CELLPADDING="4" BGCOLOR="#FFFFFF" BORDER=0 width="100%">
<tr>
@@ -57,7 +59,7 @@
# print channel image
if ($rss->{'image'}->{'link'}) {
- print <<HTML;
+ print <<"HTML";
<center>
<p><a href="$rss->{'image'}->{'link'}"><img src="$rss->{'image'}->{'url'}" alt="$rss->{'image'}->{'title'}" border="0"
HTML
@@ -76,7 +78,7 @@
# if there's a textinput element
if ($rss->{'textinput'}->{'title'}) {
- print <<HTML;
+ print <<"HTML";
<form method="get" action="$rss->{'textinput'}->{'link'}">
$rss->{'textinput'}->{'description'}<BR>
<input type="text" name="$rss->{'textinput'}->{'name'}"><BR>
@@ -87,12 +89,12 @@
# if there's a copyright element
if ($rss->{'channel'}->{'copyright'}) {
- print <<HTML;
+ print <<"HTML";
<p><sub>$rss->{'channel'}->{'copyright'}</sub></p>
HTML
}
- print <<HTML;
+ print <<"HTML";
</td>
</TR>
</TABLE>
@@ -100,8 +102,3 @@
HTML
}
-
-
-
-
-
Modified: branches/upstream/libxml-rss-perl/current/lib/XML/RSS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/lib/XML/RSS.pm?rev=72993&op=diff
==============================================================================
--- branches/upstream/libxml-rss-perl/current/lib/XML/RSS.pm (original)
+++ branches/upstream/libxml-rss-perl/current/lib/XML/RSS.pm Thu Apr 21 18:14:46 2011
@@ -16,7 +16,7 @@
require 5.008;
-$VERSION = '1.48';
+$VERSION = '1.49';
$AUTO_ADD = 0;
@@ -993,6 +993,11 @@
elsif ($self->_start_array_element("skipDays", $el)) {
# Do nothing - already done in the predicate.
}
+ elsif ($el eq 'cloud') {
+ if (keys %attribs) {
+ $self->{channel}{cloud} = \%attribs;
+ }
+ }
elsif ($el eq 'item') {
# deal with trouble makers who use mod_content :)
Added: branches/upstream/libxml-rss-perl/current/t/2.0-parse-cloud.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/t/2.0-parse-cloud.t?rev=72993&op=file
==============================================================================
--- branches/upstream/libxml-rss-perl/current/t/2.0-parse-cloud.t (added)
+++ branches/upstream/libxml-rss-perl/current/t/2.0-parse-cloud.t Thu Apr 21 18:14:46 2011
@@ -1,0 +1,135 @@
+use strict;
+use warnings;
+
+# Should be 11.
+use Test::More tests => 11;
+
+use XML::RSS;
+
+use constant RSS_VERSION => "2.0";
+use constant RSS_CHANNEL_TITLE => "Example 2.0 Channel";
+
+use constant RSS_DOCUMENT => qq(<?xml version="1.0"?>
+<rss version="2.0">
+ <channel>
+ <title>Example 2.0 Channel</title>
+ <link>http://example.com/</link>
+ <description>To lead by example</description>
+ <language>en-us</language>
+ <copyright>All content Public Domain, except comments which remains copyright the author</copyright>
+ <managingEditor>editor\@example.com</managingEditor>
+ <webMaster>webmaster\@example.com</webMaster>
+ <docs>http://backend.userland.com/rss</docs>
+ <category domain="http://www.dmoz.org">Reference/Libraries/Library_and_Information_Science/Technical_Services/Cataloguing/Metadata/RDF/Applications/RSS/</category>
+ <generator>The Superest Dooperest RSS Generator</generator>
+ <lastBuildDate>Mon, 02 Sep 2002 03:19:17 GMT</lastBuildDate>
+ <ttl>60</ttl>
+ <cloud domain="rpc.rsscloud.org" port="5337" path="/rsscloud/pleaseNotify" registerProcedure="" protocol="http-post" />
+
+ <item>
+ <title>News for September the Second</title>
+ <link>http://example.com/2002/09/02</link>
+ <description>other things happened today</description>
+ <comments>http://example.com/2002/09/02/comments.html</comments>
+ <author>joeuser\@example.com</author>
+ <pubDate>Mon, 02 Sep 2002 03:19:00 GMT</pubDate>
+ <guid isPermaLink="true">http://example.com/2002/09/02</guid>
+ </item>
+
+ <item>
+ <title>News for September the First</title>
+ <link>http://example.com/2002/09/01</link>
+ <description>something happened today</description>
+ <comments>http://example.com/2002/09/01/comments.html</comments>
+ <author>joeuser\@example.com</author>
+ <pubDate>Sun, 01 Sep 2002 12:01:00 GMT</pubDate>
+ <guid isPermaLink="true">http://example.com/2002/09/02</guid>
+ </item>
+
+ </channel>
+</rss>);
+
+my $xml = XML::RSS->new();
+# TEST
+isa_ok($xml,"XML::RSS");
+
+eval { $xml->parse(RSS_DOCUMENT); };
+# TEST
+is($@,'',"Parsed RSS feed");
+
+# TEST
+is($xml->{channel}{cloud}{domain}, 'rpc.rsscloud.org');
+
+# TEST
+is($xml->{channel}{cloud}{port}, '5337');
+
+# TEST
+is($xml->{channel}{cloud}{path}, '/rsscloud/pleaseNotify');
+
+# TEST
+is($xml->{channel}{cloud}{registerProcedure}, '');
+
+# TEST
+is($xml->{channel}{cloud}{protocol}, 'http-post');
+
+
+# TEST
+cmp_ok($xml->{'_internal'}->{'version'},"eq",RSS_VERSION,"Is RSS version ".RSS_VERSION);
+
+# TEST
+cmp_ok($xml->{channel}->{'title'},"eq",RSS_CHANNEL_TITLE,"Feed title is ".RSS_CHANNEL_TITLE);
+
+# TEST
+cmp_ok(ref($xml->{items}),"eq","ARRAY","\$xml->{items} is an ARRAY ref");
+
+my $ok = 1;
+
+foreach my $item (@{$xml->{items}}) {
+
+ my $min = 0;
+ foreach my $el ("title","description") {
+ if (exists $item->{$el}) {
+ $min ||= 1;
+ }
+ }
+
+ $ok = $min;
+ last if (! $ok);
+}
+
+# TEST
+ok($ok,"All items have either a title or a description element");
+
+__END__
+
+=head1 NAME
+
+2.0-parse-cloud.t - parse rssCloud:
+https://rt.cpan.org/Ticket/Display.html?id=67241
+
+=head1 SYNOPSIS
+
+ use Test::Harness qw (runtests);
+ runtests (./XML-RSS/t/*.t);
+
+=head1 DESCRIPTION
+
+Tests for parsing RSS 2.0 with rssCloud with XML-RSS.
+
+=head1 VERSION
+
+$Revision: 1.2 $
+
+=head1 DATE
+
+$Date: 2002/11/19 23:56:53 $
+
+=head1 AUTHOR
+
+Aaron Straup Cope
+
+=head1 SEE ALSO
+
+http://backend.userland.com/rss2
+
+=cut
Modified: branches/upstream/libxml-rss-perl/current/t/test_manifest
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rss-perl/current/t/test_manifest?rev=72993&op=diff
==============================================================================
--- branches/upstream/libxml-rss-perl/current/t/test_manifest (original)
+++ branches/upstream/libxml-rss-perl/current/t/test_manifest Thu Apr 21 18:14:46 2011
@@ -15,6 +15,7 @@
2.0-modules.t
2.0-permalink.t
2.0-parse.t
+2.0-parse-cloud.t
2.0-parse-2.t
2.0-parse-self.t
2.0-wo-title.t
More information about the Pkg-perl-cvs-commits
mailing list