r43937 - in /trunk/libxml-rsslite-perl: CHANGES MANIFEST META.yml RSSLite.pm debian/changelog t/01basic.t t/02rss.t

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Fri Sep 11 23:19:08 UTC 2009


Author: nhandler-guest
Date: Fri Sep 11 23:18:57 2009
New Revision: 43937

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=43937
Log:
Update to 0.15

Added:
    trunk/libxml-rsslite-perl/META.yml
      - copied unchanged from r43936, branches/upstream/libxml-rsslite-perl/current/META.yml
Modified:
    trunk/libxml-rsslite-perl/CHANGES
    trunk/libxml-rsslite-perl/MANIFEST
    trunk/libxml-rsslite-perl/RSSLite.pm
    trunk/libxml-rsslite-perl/debian/changelog
    trunk/libxml-rsslite-perl/t/01basic.t
    trunk/libxml-rsslite-perl/t/02rss.t

Modified: trunk/libxml-rsslite-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rsslite-perl/CHANGES?rev=43937&op=diff
==============================================================================
--- trunk/libxml-rsslite-perl/CHANGES (original)
+++ trunk/libxml-rsslite-perl/CHANGES Fri Sep 11 23:18:57 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: trunk/libxml-rsslite-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rsslite-perl/MANIFEST?rev=43937&op=diff
==============================================================================
--- trunk/libxml-rsslite-perl/MANIFEST (original)
+++ trunk/libxml-rsslite-perl/MANIFEST Fri Sep 11 23:18:57 2009
@@ -8,3 +8,4 @@
 t/02rss.t
 t/journal.rss
 t/sampleRSS.xml
+META.yml                                 Module meta-data (added by MakeMaker)

Modified: trunk/libxml-rsslite-perl/RSSLite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rsslite-perl/RSSLite.pm?rev=43937&op=diff
==============================================================================
--- trunk/libxml-rsslite-perl/RSSLite.pm (original)
+++ trunk/libxml-rsslite-perl/RSSLite.pm Fri Sep 11 23:18:57 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=("|&quot;)?(.*?)("|>|&quot;|&gt;)?}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: trunk/libxml-rsslite-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rsslite-perl/debian/changelog?rev=43937&op=diff
==============================================================================
--- trunk/libxml-rsslite-perl/debian/changelog (original)
+++ trunk/libxml-rsslite-perl/debian/changelog Fri Sep 11 23:18:57 2009
@@ -1,3 +1,9 @@
+libxml-rsslite-perl (0.15-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Live session user <ubuntu at ubuntu>  Fri, 11 Sep 2009 23:16:42 +0000
+
 libxml-rsslite-perl (0.11-4) UNRELEASED; urgency=low
 
   [ gregor herrmann ]

Modified: trunk/libxml-rsslite-perl/t/01basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rsslite-perl/t/01basic.t?rev=43937&op=diff
==============================================================================
--- trunk/libxml-rsslite-perl/t/01basic.t (original)
+++ trunk/libxml-rsslite-perl/t/01basic.t Fri Sep 11 23:18:57 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: trunk/libxml-rsslite-perl/t/02rss.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rsslite-perl/t/02rss.t?rev=43937&op=diff
==============================================================================
--- trunk/libxml-rsslite-perl/t/02rss.t (original)
+++ trunk/libxml-rsslite-perl/t/02rss.t Fri Sep 11 23:18:57 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