r27127 - in /trunk/libxml-atom-perl: Changes META.yml debian/changelog lib/XML/Atom.pm lib/XML/Atom/Base.pm lib/XML/Atom/Client.pm t/12-feed.t t/14-atom1-create.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Nov 22 16:28:08 UTC 2008
Author: gregoa
Date: Sat Nov 22 16:28:04 2008
New Revision: 27127
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27127
Log:
New upstream release.
Modified:
trunk/libxml-atom-perl/Changes
trunk/libxml-atom-perl/META.yml
trunk/libxml-atom-perl/debian/changelog
trunk/libxml-atom-perl/lib/XML/Atom.pm
trunk/libxml-atom-perl/lib/XML/Atom/Base.pm
trunk/libxml-atom-perl/lib/XML/Atom/Client.pm
trunk/libxml-atom-perl/t/12-feed.t
trunk/libxml-atom-perl/t/14-atom1-create.t
Modified: trunk/libxml-atom-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/Changes?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/Changes (original)
+++ trunk/libxml-atom-perl/Changes Sat Nov 22 16:28:04 2008
@@ -1,6 +1,15 @@
-$Id: Changes 98 2008-10-26 00:26:40Z miyagawa $
+$Id: Changes 104 2008-11-13 21:18:54Z miyagawa $
Revision history for XML::Atom
+
+0.31 2008.11.13
+ * Update Content-Type in XML::Atom::Client when the entity's version >= 1.0
+ (Thanks to David Steinbrunner RT 39801)
+
+0.30 2008.11.12
+ * hopefully fix a bug where xml:base returns an empty string
+ e.g. http://www.nntp.perl.org/group/perl.cpan.testers/2008/11/msg2595696.html
+ (Thanks to tokuhirom http://d.hatena.ne.jp/tokuhirom/20081110/1226280757)
0.29 2008.10.25
* Skips Unicode tests since it doesn't pass with some libxml versions (and it's not actually a bug)
Modified: trunk/libxml-atom-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/META.yml?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/META.yml (original)
+++ trunk/libxml-atom-perl/META.yml Sat Nov 22 16:28:04 2008
@@ -21,4 +21,4 @@
XML::LibXML: 1.64
resources:
license: http://dev.perl.org/licenses/
-version: 0.29
+version: 0.31
Modified: trunk/libxml-atom-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/debian/changelog?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/debian/changelog (original)
+++ trunk/libxml-atom-perl/debian/changelog Sat Nov 22 16:28:04 2008
@@ -1,7 +1,8 @@
-libxml-atom-perl (0.29-2) UNRELEASED; urgency=low
+libxml-atom-perl (0.31-1) UNRELEASED; urgency=low
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
(source stanza).
+ * New upstream release.
-- gregor herrmann <gregoa at debian.org> Sun, 16 Nov 2008 20:49:07 +0100
Modified: trunk/libxml-atom-perl/lib/XML/Atom.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/lib/XML/Atom.pm?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/lib/XML/Atom.pm (original)
+++ trunk/libxml-atom-perl/lib/XML/Atom.pm Sat Nov 22 16:28:04 2008
@@ -1,9 +1,9 @@
-# $Id: Atom.pm 98 2008-10-26 00:26:40Z miyagawa $
+# $Id: Atom.pm 104 2008-11-13 21:18:54Z miyagawa $
package XML::Atom;
use strict;
-our $VERSION = '0.29';
+our $VERSION = '0.31';
BEGIN {
@XML::Atom::EXPORT = qw( LIBXML );
Modified: trunk/libxml-atom-perl/lib/XML/Atom/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/lib/XML/Atom/Base.pm?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/lib/XML/Atom/Base.pm (original)
+++ trunk/libxml-atom-perl/lib/XML/Atom/Base.pm Sat Nov 22 16:28:04 2008
@@ -1,4 +1,4 @@
-# $Id: Base.pm 94 2007-11-06 21:05:44Z miyagawa $
+# $Id: Base.pm 103 2008-11-13 21:17:30Z miyagawa $
package XML::Atom::Base;
use strict;
@@ -62,6 +62,15 @@
sub version {
my $atom = shift;
XML::Atom::Util::ns_to_version($atom->ns);
+}
+
+sub content_type {
+ my $atom = shift;
+ if ($atom->version >= 1.0) {
+ return "application/atom+xml";
+ } else {
+ return "application/x.atom+xml";
+ }
}
sub get {
@@ -343,7 +352,7 @@
my $obj = shift;
if (LIBXML) {
my $doc = XML::LibXML::Document->new('1.0', 'utf-8');
- $doc->setDocumentElement($obj->elem);
+ $doc->setDocumentElement($obj->elem->cloneNode(1));
return $doc->toString(1);
} else {
return '<?xml version="1.0" encoding="utf-8"?>' . "\n" .
Modified: trunk/libxml-atom-perl/lib/XML/Atom/Client.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/lib/XML/Atom/Client.pm?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/lib/XML/Atom/Client.pm (original)
+++ trunk/libxml-atom-perl/lib/XML/Atom/Client.pm Sat Nov 22 16:28:04 2008
@@ -1,4 +1,4 @@
-# $Id: Client.pm 77 2006-11-30 23:10:18Z miyagawa $
+# $Id: Client.pm 103 2008-11-13 21:17:30Z miyagawa $
package XML::Atom::Client;
use strict;
@@ -71,7 +71,7 @@
return $client->error("Must pass a PostURI before posting")
unless $uri;
my $req = HTTP::Request->new(POST => $uri);
- $req->content_type('application/x.atom+xml');
+ $req->content_type($entry->content_type);
my $xml = $entry->as_xml;
_utf8_off($xml);
$req->content_length(length $xml);
@@ -86,7 +86,7 @@
my $client = shift;
my($url, $entry) = @_;
my $req = HTTP::Request->new(PUT => $url);
- $req->content_type('application/x.atom+xml');
+ $req->content_type($entry->content_type);
my $xml = $entry->as_xml;
_utf8_off($xml);
$req->content_length(length $xml);
@@ -135,7 +135,7 @@
my $client = shift;
my($req) = @_;
$req->header(
- Accept => 'application/x.atom+xml, application/xml, text/xml, */*',
+ Accept => 'application/atom+xml, application/x.atom+xml, application/xml, text/xml, */*',
);
my $nonce = $client->make_nonce;
my $nonce_enc = encode_base64($nonce, '');
Modified: trunk/libxml-atom-perl/t/12-feed.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/t/12-feed.t?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/t/12-feed.t (original)
+++ trunk/libxml-atom-perl/t/12-feed.t Sat Nov 22 16:28:04 2008
@@ -1,8 +1,8 @@
-# $Id: 12-feed.t 39 2006-08-16 05:34:19Z miyagawa $
+# $Id: 12-feed.t 103 2008-11-13 21:17:30Z miyagawa $
use strict;
-use Test::More tests => 32;
+use Test::More tests => 33;
use XML::Atom::Feed;
use URI;
@@ -70,3 +70,5 @@
is scalar @entries, 17;
is $entries[0]->title, 'Bar';
is $feed->title, 'dive into atom';
+
+is $feed->content_type, "application/x.atom+xml";
Modified: trunk/libxml-atom-perl/t/14-atom1-create.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-perl/t/14-atom1-create.t?rev=27127&op=diff
==============================================================================
--- trunk/libxml-atom-perl/t/14-atom1-create.t (original)
+++ trunk/libxml-atom-perl/t/14-atom1-create.t Sat Nov 22 16:28:04 2008
@@ -3,7 +3,7 @@
use XML::Atom;
use XML::Atom::Feed;
use XML::Atom::Link;
-use Test::More tests => 9;
+use Test::More tests => 10;
my $feed = XML::Atom::Feed->new(Version => 1.0);
$feed->title("foo bar");
@@ -46,3 +46,5 @@
is $feed->title, "foo bar";
is $feed->link->href, 'http://www.example.com/';
+is $feed->content_type, "application/atom+xml";
+
More information about the Pkg-perl-cvs-commits
mailing list