r43935 - in /branches/upstream/libxml-rsslite-perl/current: CHANGES MANIFEST META.yml RSSLite.pm t/01basic.t t/02rss.t
nhandler-guest at users.alioth.debian.org
nhandler-guest at users.alioth.debian.org
Fri Sep 11 23:15:53 UTC 2009
Author: nhandler-guest
Date: Fri Sep 11 23:15:48 2009
New Revision: 43935
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=43935
Log:
[svn-upgrade] Integrating new upstream version, libxml-rsslite-perl (0.15)
Added:
branches/upstream/libxml-rsslite-perl/current/META.yml
Modified:
branches/upstream/libxml-rsslite-perl/current/CHANGES
branches/upstream/libxml-rsslite-perl/current/MANIFEST
branches/upstream/libxml-rsslite-perl/current/RSSLite.pm
branches/upstream/libxml-rsslite-perl/current/t/01basic.t
branches/upstream/libxml-rsslite-perl/current/t/02rss.t
Modified: branches/upstream/libxml-rsslite-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rsslite-perl/current/CHANGES?rev=43935&op=diff
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/CHANGES (original)
+++ branches/upstream/libxml-rsslite-perl/current/CHANGES Fri Sep 11 23:15:48 2009
@@ -1,4 +1,15 @@
Revision history for Perl extension XML::RSSLite.
+
+0.15 Sat Sep 5 23:25:51 EDT 2009
+ Strip bracketing whitespace from links
+
+ Support SSL links
+
+ Fix(?) relative URI munging, broken since at least 0.06
+
+ Fixed HTML anchor in item link munging, broken since at least 0.06
+
+ Fixed title URI to link if latter is missing, broken since at least 0.06
0.11 Mon Feb 24 06:25:54 UTC 2003
Vast speed and memory requirement improvements for deep structures.
Modified: branches/upstream/libxml-rsslite-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rsslite-perl/current/MANIFEST?rev=43935&op=diff
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/MANIFEST (original)
+++ branches/upstream/libxml-rsslite-perl/current/MANIFEST Fri Sep 11 23:15:48 2009
@@ -8,3 +8,4 @@
t/02rss.t
t/journal.rss
t/sampleRSS.xml
+META.yml Module meta-data (added by MakeMaker)
Added: branches/upstream/libxml-rsslite-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rsslite-perl/current/META.yml?rev=43935&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/META.yml (added)
+++ branches/upstream/libxml-rsslite-perl/current/META.yml Fri Sep 11 23:15:48 2009
@@ -1,0 +1,12 @@
+--- #YAML:1.0
+name: XML-RSSLite
+version: 0.15
+abstract: ~
+license: ~
+author: ~
+generated_by: ExtUtils::MakeMaker version 6.42
+distribution_type: module
+requires:
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
Modified: branches/upstream/libxml-rsslite-perl/current/RSSLite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rsslite-perl/current/RSSLite.pm?rev=43935&op=diff
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/RSSLite.pm (original)
+++ branches/upstream/libxml-rsslite-perl/current/RSSLite.pm Fri Sep 11 23:15:48 2009
@@ -3,7 +3,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = 0.11;
+$VERSION = 0.15;
sub import{
no strict 'refs';
@@ -143,10 +143,10 @@
# See if you can use misplaced url in title for empty links
elsif( exists($i->{'title'}) ){
# The next case would trap this, but try to short-circuit the gathering
- if ($i->{'title'} =~ /^(?:ht)|ftp:/) {
+ if ($i->{'title'} =~ /^(?:https?|ftp):/) {
$i->{'link'} = $i->{'title'};
}
- elsif ($i->{'title'} =~ /"((?:ht)|ftp.*?)"/) {
+ elsif ($i->{'title'} =~ /"((?:https?|ftp).*?)"/) {
$i->{'link'} = $1;
$i->{'title'} =~ s/<.*?>//;
}
@@ -156,15 +156,16 @@
}
}
+ # Clean bogus whitespace
+ $i->{'link'} =~ s/^\s+|\s+$//;
+
# Make sure you've got an http/ftp link
- if( exists( $i->{'link'}) && $i->{'link'} !~ m{^(http|ftp)://}i) {
+ if( exists( $i->{'link'}) && $i->{'link'} !~ m{^(https?|ftp)://}i) {
## Rip link out of anchor tag
- $i->{'link'} =~ m{a\s+href=("|")?(.*?)("|>|"|>)?}i;
- if( $2 ){
- $i->{'link'} = $2;
- }
- elsif( $i->{'link'} =~ m{[\.#/]}i and $rr->{'link'} =~ m{^http://} ){
- ## Smells like a relative url
+ if( ref($i->{'link'}) && $i->{'link'}->{a}->{href} ){
+ $i->{'link'} = $i->{'link'}->{a}->{href} }
+ ## Smells like a relative url
+ elsif( $i->{'link'} =~ m{^[#/]} and $rr->{'link'} =~ m{^https?://} ){
if (substr($i->{'link'}, 0, 1) ne '/') {
$i->{'link'} = '/' . $i->{'link'};
}
@@ -247,7 +248,7 @@
#Did we get attributes? clean them up and chuck them in a hash.
if( $attr ){
($_, $attr) = ($attr, {});
- $attr->{$1} = $3 while m/([^\s=]+)\s*=\s*(['"])(.*?)\2/g;
+ $attr->{$1} = $3 while m/([^\s=]+)\s*=\s*(['"]?)([^\2>]*?)(?:\2|$)/g;
}
my $inhash;
@@ -346,15 +347,17 @@
=item Remove characters other than 0-9~!@#$%^&*()-+=a-zA-Z[];',.:"<>?\s
+=item Remove leading whitespace from URIs
+
=item Use <url> tags when <link> is empty
=item Use misplaced urls in <title> when <link> is empty
=item Exract links from <a href=...> if required
-=item Limit links to ftp and http
-
-=item Join relative urls to the site base
+=item Limit links to ftp and http(s)
+
+=item Join relative item urls (beginning with / or #) to the site base
=back
@@ -436,7 +439,7 @@
=item namespaces
-This might be arriving in the next release.
+This may or may not be arriving in some future release.
=back
@@ -455,7 +458,7 @@
=head1 LICENSE
-Portions Copyright (c) 2002 Jerrad Pierce, (c) 2000 Scott Thomason.
+Portions Copyright (c) 2002,2003,2009 Jerrad Pierce, (c) 2000 Scott Thomason.
All rights reserved. This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
Modified: branches/upstream/libxml-rsslite-perl/current/t/01basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rsslite-perl/current/t/01basic.t?rev=43935&op=diff
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/t/01basic.t (original)
+++ branches/upstream/libxml-rsslite-perl/current/t/01basic.t Fri Sep 11 23:15:48 2009
@@ -1,7 +1,7 @@
use XML::RSSLite;
print "1..2\n";
-print "ok 1\n";
+print "ok 1 #Require\n";
print 'not ' unless defined($XML::RSSLite::VERSION);
-print "ok 2\n";
+print "ok 2 #VERSION\n";
Modified: branches/upstream/libxml-rsslite-perl/current/t/02rss.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-rsslite-perl/current/t/02rss.t?rev=43935&op=diff
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/t/02rss.t (original)
+++ branches/upstream/libxml-rsslite-perl/current/t/02rss.t Fri Sep 11 23:15:48 2009
@@ -7,7 +7,7 @@
close(RSS);
parseRSS(\%result, \$str);
print 'not ' unless $result{image}->[1]->{width} == 176;
- print "ok 1 # $result{image}->[1]->{width} == 176\n";
+ print "ok 1 #IMG width # $result{image}->[1]->{width} == 176\n";
}
else{
print "ok 1 #skipped Could not open t/sampleRSS.xml:$!\n";
@@ -19,7 +19,7 @@
close(RSS);
parseRSS(\%result, \$str);
print 'not ' unless $result{items}->[0]->{title} eq 'gizmo_mathboy (2002.05.03 13:41)';
- print "ok 2 # '$result{items}->[0]->{title}' eq 'gizmo_mathboy (2002.05.03 13:41)'\n";
+ print "ok 2 #Title # '$result{items}->[0]->{title}' eq 'gizmo_mathboy (2002.05.03 13:41)'\n";
}
else{
print "ok 2 #skipped Could not open t/rss: $!\n";
More information about the Pkg-perl-cvs-commits
mailing list