r50530 - in /branches/upstream/libxml-stream-perl/current: ./ lib/XML/ lib/XML/Stream/ lib/XML/Stream/IO/ lib/XML/Stream/IO/Select/ lib/XML/Stream/Parser/ lib/XML/Stream/XPath/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Jan 8 15:48:17 UTC 2010


Author: jawnsy-guest
Date: Fri Jan  8 15:48:06 2010
New Revision: 50530

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=50530
Log:
[svn-upgrade] Integrating new upstream version, libxml-stream-perl (1.23)

Added:
    branches/upstream/libxml-stream-perl/current/SIGNATURE
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/IO/
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/IO/Select/
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/IO/Select/Win32.pm
    branches/upstream/libxml-stream-perl/current/t/0-signature.t
    branches/upstream/libxml-stream-perl/current/t/cdata.t
    branches/upstream/libxml-stream-perl/current/t/quotes.t
Removed:
    branches/upstream/libxml-stream-perl/current/MANIFEST.SKIP
Modified:
    branches/upstream/libxml-stream-perl/current/CHANGES
    branches/upstream/libxml-stream-perl/current/MANIFEST
    branches/upstream/libxml-stream-perl/current/META.yml
    branches/upstream/libxml-stream-perl/current/Makefile.PL
    branches/upstream/libxml-stream-perl/current/README
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Namespace.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Node.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser/DTD.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Tree.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Op.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Query.pm
    branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Value.pm
    branches/upstream/libxml-stream-perl/current/t/tcpip.t
    branches/upstream/libxml-stream-perl/current/t/tcpip2ssl.t

Modified: branches/upstream/libxml-stream-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/CHANGES?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/CHANGES (original)
+++ branches/upstream/libxml-stream-perl/current/CHANGES Fri Jan  8 15:48:06 2010
@@ -1,3 +1,16 @@
+1.23
+====
+  - RT#17484 Handle servers which re-use stream ID 
+  - RT#18711 Update link to XML Streams doc 
+  - RT#12977 Require perl >= 5.8.0
+  - RT#19415 Use jabber.org for tests
+  - RT#21932 Fix authname for Google Talk SASL auth
+  - RT#39098 Make dependencies more explicit
+  - RT#24817 Merge and massage of toddr's SASL fix
+  - RT#36864 Fake select on filehandles on win32
+  - RT#31215 Test and fix for XML node copying issue
+  - RT#17325 Fix and test for infinite loop on quotes
+
 1.22
 ====
   - Using Encode module to handle utf encoding and decoding.  I cannot

Modified: branches/upstream/libxml-stream-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/MANIFEST?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/MANIFEST (original)
+++ branches/upstream/libxml-stream-perl/current/MANIFEST Fri Jan  8 15:48:06 2010
@@ -1,13 +1,9 @@
 CHANGES
-README
 INFO
-LICENSE.LGPL
-MANIFEST
-MANIFEST.SKIP
-Makefile.PL
 lib/XML/Stream.pm
+lib/XML/Stream/IO/Select/Win32.pm
+lib/XML/Stream/Namespace.pm
 lib/XML/Stream/Node.pm
-lib/XML/Stream/Namespace.pm
 lib/XML/Stream/Parser.pm
 lib/XML/Stream/Parser/DTD.pm
 lib/XML/Stream/Tree.pm
@@ -15,16 +11,24 @@
 lib/XML/Stream/XPath/Op.pm
 lib/XML/Stream/XPath/Query.pm
 lib/XML/Stream/XPath/Value.pm
+LICENSE.LGPL
+Makefile.PL
+MANIFEST			This list of files
+META.yml
+README
+t/0-signature.t
 t/buildxml.t
+t/cdata.t
 t/lib/Test/Builder.pm
 t/lib/Test/More.pm
 t/lib/Test/Simple.pm
 t/load.t
 t/parse_node.t
 t/parse_tree.t
+t/quotes.t
 t/tcpip.t
 t/tcpip2ssl.t
 t/test.xml
 t/xml2config.t
 t/xpath.t
-META.yml                                 Module meta-data (added by MakeMaker)
+SIGNATURE                                Public-key signature (added by MakeMaker)

Modified: branches/upstream/libxml-stream-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/META.yml?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/META.yml (original)
+++ branches/upstream/libxml-stream-perl/current/META.yml Fri Jan  8 15:48:06 2010
@@ -1,12 +1,35 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         XML-Stream
-version:      1.22
-version_from: lib/XML/Stream.pm
-installdirs:  site
+--- #YAML:1.0
+name:               XML-Stream
+version:            1.23
+abstract:           Creates an XML Stream connection and parses return data
+author:
+    - Darian Anthony Patrick <dapatrick at cpan.org>
+license:            LGPL
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
 requires:
-    Authen::SASL:                  0
-    MIME::Base64:                  0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+    Authen::SASL:   0
+    Carp:           0
+    Encode:         0
+    FileHandle:     0
+    IO::Select:     0
+    IO::Socket:     0
+    MIME::Base64:   0
+    perl:           5.008
+    POSIX:          0
+    Sys::Hostname:  0
+    utf8:           0
+resources:
+    bugtracker:  https://rt.cpan.org/Dist/Display.html?Queue=XML-Stream
+    repository:  http://github.com/dap/XML-Stream
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.56
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libxml-stream-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/Makefile.PL?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/Makefile.PL (original)
+++ branches/upstream/libxml-stream-perl/current/Makefile.PL Fri Jan  8 15:48:06 2010
@@ -1,15 +1,31 @@
-use 5.006_001;
+use 5.008_000;
 use ExtUtils::MakeMaker;
 
 WriteMakefile(
-    'NAME'  => 'XML::Stream',
-    'VERSION_FROM' => 'lib/XML/Stream.pm',
-    'PREREQ_PM' => {
-        'Authen::SASL' => 0,
-        'MIME::Base64' => 0,
+    (MM->can('signature_target') ? (SIGN => 1) : ()),
+    'NAME'             => 'XML::Stream',
+    'VERSION_FROM'     => 'lib/XML/Stream.pm',
+    'ABSTRACT_FROM'    => 'lib/XML/Stream.pm',
+    'AUTHOR'           => 'Darian Anthony Patrick <dapatrick at cpan.org>',
+    'LICENSE'          => 'LGPL',
+    'MIN_PERL_VERSION' => '5.008',
+    'PREREQ_PM'        => {
+        'Authen::SASL'  => 0,
+        'MIME::Base64'  => 0,
+        'Sys::Hostname' => 0,
+        'IO::Socket'    => 0,
+        'IO::Select'    => 0,
+        'FileHandle'    => 0,
+        'Carp'          => 0,
+        'POSIX'         => 0,
+        'utf8'          => 0,
+        'Encode'        => 0,
     },
-    'dist' => {
-        'COMPRESS' => 'gzip --best'
-    }
+    'META_MERGE'       => {
+        'resources' => {
+            'bugtracker' => 'https://rt.cpan.org/Dist/Display.html?Queue=XML-Stream',
+            'repository' => 'http://github.com/dap/XML-Stream',
+        }
+    },
 );
 

Modified: branches/upstream/libxml-stream-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/README?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/README (original)
+++ branches/upstream/libxml-stream-perl/current/README Fri Jan  8 15:48:06 2010
@@ -1,14 +1,14 @@
-XML::Stream v1.22
+XML::Stream v1.23_01 2009-12-31
 
 This module provides you with access to XML Streams.  An XML Stream
 is just that.  A stream of XML over a connection between two computers.
 For more information about XML Streams, and the group that created them,
 please visit:
 
-http://etherx.jabber.org/streams
+http://xmpp.org/protocols/streams/
 
-Ryan Eatmon
-reatmon at jabber.org
+Darian Anthony Patrick
+dapatrick at cpan.org
 
 
 INSTALLATION
@@ -28,11 +28,6 @@
   IO::Socket::SSL v0.81 - Module to enable TLS for XML::Stream.
   Net::DNS              - Enables access to SRV records.
 
-STATUS
+Please submit bug reports at
+http://rt.cpan.org/Public/Bug/Report.html?Queue=XML-Stream
 
-    Initial support added for XMPP 1.0.  This release may not be stable.  If
-you run into problems, downgrade to 1.21.
-
-Please send any bug reports to reatmon at jabber.org.
-2004/08/22
-

Added: branches/upstream/libxml-stream-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/SIGNATURE?rev=50530&op=file
==============================================================================
--- branches/upstream/libxml-stream-perl/current/SIGNATURE (added)
+++ branches/upstream/libxml-stream-perl/current/SIGNATURE Fri Jan  8 15:48:06 2010
@@ -1,0 +1,56 @@
+This file contains message digests of all files listed in MANIFEST,
+signed via the Module::Signature module, version 0.61.
+
+To verify the content in this distribution, first make sure you have
+Module::Signature installed, then type:
+
+    % cpansign -v
+
+It will check each file's integrity, as well as the signature's
+validity.  If "==> Signature verified OK! <==" is not displayed,
+the distribution may already have been compromised, and you should
+not run its Makefile.PL or Build.PL.
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+SHA1 15d61963df469cda6d0e12f471866856dd4b6952 CHANGES
+SHA1 196d154af87fc5e3d911add822f01102f2b924da INFO
+SHA1 8ff23a37b0bf322b7e4e73d5ceeec7f417f5eaa9 LICENSE.LGPL
+SHA1 cd0584c8c15178944fbd3f0bece34b837782c49d MANIFEST
+SHA1 32e1b15c490b7d6d778a8c85ef599b05840c25ac META.yml
+SHA1 8928801747c656d078c7f69ff3ec88a19d714ac9 Makefile.PL
+SHA1 5147913455418c51a15ed05a87431f2ebac8afbf README
+SHA1 de809bcc59a173081dd185faf1f949acb02c9b32 lib/XML/Stream.pm
+SHA1 65d7eb5df10bf9bff56da827edf701133dc34239 lib/XML/Stream/IO/Select/Win32.pm
+SHA1 1881347c3a7bc6b27bbc6ff639ba56be835939d4 lib/XML/Stream/Namespace.pm
+SHA1 9dd6cca9d062173cb8115e7ed1a30cb4fb8bb417 lib/XML/Stream/Node.pm
+SHA1 ca408e2e322974ce7e40ceb113c02ec24894fbd2 lib/XML/Stream/Parser.pm
+SHA1 b4d59b4741269a9ff6ceb0fe62235c27556a8a8d lib/XML/Stream/Parser/DTD.pm
+SHA1 e4259c7b57d3ce93364d4189def440e3c395606c lib/XML/Stream/Tree.pm
+SHA1 ff63c6ad822b958754d8e7ae7b8da4a2cd732aac lib/XML/Stream/XPath.pm
+SHA1 27614a513004374070fcb808d981214a84a794b8 lib/XML/Stream/XPath/Op.pm
+SHA1 ff730f0ccbb026aef431a33f3b83e3526a16811e lib/XML/Stream/XPath/Query.pm
+SHA1 99f41e999e62a92f95527bc863aef978f2140a5a lib/XML/Stream/XPath/Value.pm
+SHA1 4aeb184c9bed26ab6c3be1ebdb8470c0cb353b1f t/0-signature.t
+SHA1 df699ebee5bf1cb549949164b410865cbd4c2e0d t/buildxml.t
+SHA1 e2c38563da2f61b28f051c882942158eff4fe1b1 t/cdata.t
+SHA1 1febe2e170ead4f8f5865f31fd72746c03dd3cce t/lib/Test/Builder.pm
+SHA1 51c49a3df7cc24f3507c97c16f11c0f87e6f51e7 t/lib/Test/More.pm
+SHA1 871dd89f9b3404ee836da317db33c61295035f7c t/lib/Test/Simple.pm
+SHA1 ff41418f62760f89718aa1b11ac953cd8bb40f2e t/load.t
+SHA1 ab53c6def56ac1b9937ef78c9a2c35c9803ce339 t/parse_node.t
+SHA1 add9d3c6d91dc1ca9d66a5c514c604759c88286e t/parse_tree.t
+SHA1 317215868bfd167d3c21ae8e4376d9e03093008f t/quotes.t
+SHA1 7766dfdd99dbaed56e4dcd21150880a2fb3de3dc t/tcpip.t
+SHA1 1091b6ccd6a0d30eab17fe90306f709aae5c1464 t/tcpip2ssl.t
+SHA1 191c3a9c3eeca7b58b096436ee241342e6984d2f t/test.xml
+SHA1 d42030a31535a17e4e8b10a824d8843ec30f8e57 t/xml2config.t
+SHA1 ed9e965ddcc3ad37c8243595b793c112c4476e01 t/xpath.t
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iEYEARECAAYFAktGsrwACgkQjJ7fFJrTQRdsWgCeP/s2EkHm5jy+TayY6IzVkfUF
+dlEAmwb6N1iLSTEcL+uZlD4LfOFOCYB4
+=B3sH
+-----END PGP SIGNATURE-----

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream.pm Fri Jan  8 15:48:06 2010
@@ -24,7 +24,7 @@
 
 =head1 NAME
 
-XML::Stream - Creates and XML Stream connection and parses return data
+XML::Stream - Creates an XML Stream connection and parses return data
 
 =head1 SYNOPSIS
 
@@ -36,7 +36,7 @@
   server, send a stream of XML to the server, and receive/parse an XML
   stream from the server.  It is primarily based work for the Etherx XML
   router developed by the Jabber Development Team.  For more information
-  about this project visit http://etherx.jabber.org/stream/.
+  about this project visit http://xmpp.org/protocols/streams/.
 
   XML::Stream gives the user the ability to define a central callback
   that will be used to handle the tags received from the server.  These
@@ -108,7 +108,7 @@
                                       "http"     - HTTP
                                     HTTP recognizes proxies if the ENV
                                     variables http_proxy or https_proxy
-                                    are set.  ssl specifies if an SLL
+                                    are set.  ssl specifies if an SSL
                                     socket should be used for encrypted
                                     communications.  This function
                                     returns the same hash from GetRoot()
@@ -236,6 +236,8 @@
 tcharron at jabber.org
 By Jeremie in October of 1999 for http://etherx.jabber.org/streams/
 
+Currently maintained by Darian Anthony Patrick.
+
 =head1 COPYRIGHT
 
 This module is free software; you can redistribute it and/or modify
@@ -243,7 +245,7 @@
 
 =cut
 
-use 5.006_001;
+use 5.008;
 use strict;
 use Sys::Hostname;
 use IO::Socket;
@@ -255,6 +257,7 @@
 use MIME::Base64;
 use utf8;
 use Encode;
+use XML::Stream::IO::Select::Win32;
 
 $SIG{PIPE} = "IGNORE";
 
@@ -290,7 +293,7 @@
 }
 
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 $NONBLOCKING = 0;
 
 use XML::Stream::Namespace;
@@ -680,7 +683,7 @@
         $self->debug(1,"Connect: srv requested");
         if ($NETDNS)
         {
-            my $res = new Net::DNS::Resolver();
+            my $res = Net::DNS::Resolver->new();
             my $query = $res->query($self->{SIDS}->{newconnection}->{srv}.".".$self->{SIDS}->{newconnection}->{hostname},"SRV");
             
             if ($query)
@@ -1160,7 +1163,8 @@
         $self->{SOCKETS}->{*STDIN} = $sid;
     }
 
-    delete($self->{SIDS}->{$currsid});
+    delete($self->{SIDS}->{$currsid})
+        unless $currsid eq $sid;
 
     if (exists($self->GetRoot($sid)->{version}) &&
         ($self->GetRoot($sid)->{version} ne ""))
@@ -1210,10 +1214,24 @@
                         }
                  );
 
-    $self->{SIDS}->{newconnection}->{select} =
-        new IO::Select($self->{SIDS}->{newconnection}->{sock});
-
-    $self->{SELECT} = new IO::Select($self->{SIDS}->{newconnection}->{sock});
+    # select is not implemented for filehandles on win32 (see perlport)
+    # so we fake it out using XML::Stream::IO::Select::Win32
+    if ( $^O =~ /mswin32/i ) {
+        $self->{SIDS}->{newconnection}->{select}
+            = new XML::Stream::IO::Select::Win32(
+                $self->{SIDS}->{newconnection}->{sock});
+
+        $self->{SELECT}
+            = new XML::Stream::IO::Select::Win32(
+                $self->{SIDS}->{newconnection}->{sock});
+    }
+    else {
+        $self->{SIDS}->{newconnection}->{select}
+            = new IO::Select($self->{SIDS}->{newconnection}->{sock});
+
+        $self->{SELECT}
+            = new IO::Select($self->{SIDS}->{newconnection}->{sock});
+    }
 
     $self->{SIDS}->{newconnection}->{status} = 0;
 
@@ -2110,17 +2128,26 @@
     my $mechanisms = $self->GetStreamFeature($sid,"xmpp-sasl");
 
     return unless defined($mechanisms);
+
+    # Here we assume that if 'to' is available, then a domain is being
+    # specified that does not match the hostname of the jabber server
+    # and that we should use that to form the bare JID for SASL auth.
+    my $domain .=  $self->{SIDS}->{$sid}->{to}
+        ? $self->{SIDS}->{$sid}->{to}
+        : $self->{SIDS}->{$sid}->{hostname};
+
+    my $authname = $username . '@' . $domain;
     
     my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}),
                                 callback=>{
-                                           authname => $username."@".$self->{SIDS}->{$sid}->{hostname},
+                                           authname => $authname,
 
                                            user     => $username,
                                            pass     => $password
                                           }
                                );
 
-    $self->{SIDS}->{$sid}->{sasl}->{client} = $sasl->client_new();
+    $self->{SIDS}->{$sid}->{sasl}->{client} = $sasl->client_new('xmpp', $domain);
     $self->{SIDS}->{$sid}->{sasl}->{username} = $username;
     $self->{SIDS}->{$sid}->{sasl}->{password} = $password;
     $self->{SIDS}->{$sid}->{sasl}->{authed} = 0;

Added: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/IO/Select/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/IO/Select/Win32.pm?rev=50530&op=file
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/IO/Select/Win32.pm (added)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/IO/Select/Win32.pm Fri Jan  8 15:48:06 2010
@@ -1,0 +1,29 @@
+package XML::Stream::IO::Select::Win32;
+
+=head1 NAME
+
+XML::Stream::IO::Select::Win32 - Fake filehandle support for XML::Stream
+
+=head1 SYNOPSIS
+
+  You should have no reason to use this directly.
+
+=cut
+
+use strict;
+use warnings;
+
+use vars qw( $VERSION );
+
+$VERSION = "1.23";
+
+use base 'IO::Select';
+
+sub can_read {
+    my $vec = shift;
+    my $timeout = shift;
+
+    $vec->handles();
+}
+
+1;

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Namespace.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Namespace.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Namespace.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Namespace.pm Fri Jan  8 15:48:06 2010
@@ -85,6 +85,8 @@
 Written by Ryan Eatmon in February 2000
 Idea By Thomas Charron in January of 2000 for http://etherx.jabber.org/streams/
 
+Currently maintained by Darian Anthony Patrick.
+
 =head1 COPYRIGHT
 
 This module is free software; you can redistribute it and/or modify
@@ -96,7 +98,7 @@
 use Carp;
 use vars qw( $VERSION );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 
 sub new
 {

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Node.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Node.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Node.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Node.pm Fri Jan  8 15:48:06 2010
@@ -129,6 +129,8 @@
 
 By Ryan Eatmon in June 2002 for http://jabber.org/
 
+Currently maintained by Darian Anthony Patrick.
+
 =head1 COPYRIGHT
 
 This module is free software; you can redistribute it and/or modify
@@ -138,7 +140,7 @@
 
 use vars qw( $VERSION $LOADED );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 $LOADED = 1;
 
 sub new
@@ -406,7 +408,7 @@
     {
         if ($child->get_tag() eq "__xmlstream__:node:cdata")
         {
-            $new_node->add_cdata($self->get_cdata());
+            $new_node->add_cdata($child->children());
         }
         else
         {

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser.pm Fri Jan  8 15:48:06 2010
@@ -44,6 +44,8 @@
 
 By Ryan Eatmon in January of 2001 for http://jabber.org/
 
+Currently maintained by Darian Anthony Patrick.
+
 =head1 COPYRIGHT
 
 This module is free software; you can redistribute it and/or modify
@@ -54,7 +56,10 @@
 use strict;
 use vars qw( $VERSION );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
+
+use XML::Stream::Tree;
+use XML::Stream::Node;
 
 sub new
 {
@@ -383,10 +388,12 @@
             $ids = $id1;
             $id = "\'";
         }
-        if((($id2 < $id1) && ($id1 == -1)) || ($id2 != -1))
-        {
-            $ids = $id2;
-            $id = "\"";
+        else {
+            if((($id2 < $id1) && ($id1 == -1)) || ($id2 != -1))
+            {
+                $ids = $id2;
+                $id = "\"";
+            }
         }
 
         my $nextid = index($str,$id,$ids+1);

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser/DTD.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser/DTD.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser/DTD.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Parser/DTD.pm Fri Jan  8 15:48:06 2010
@@ -44,6 +44,8 @@
 
 By Ryan Eatmon in February of 2001 for http://jabber.org/
 
+Currently maintained by Darian Anthony Patrick.
+
 =head1 COPYRIGHT
 
 This module is free software; you can redistribute it and/or modify
@@ -54,7 +56,7 @@
 use strict;
 use vars qw( $VERSION );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 
 sub new
 {

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Tree.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Tree.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Tree.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/Tree.pm Fri Jan  8 15:48:06 2010
@@ -63,6 +63,8 @@
 
 By Ryan Eatmon in March 2001 for http://jabber.org/
 
+Currently maintained by Darian Anthony Patrick.
+
 =head1 COPYRIGHT
 
 This module is free software; you can redistribute it and/or modify
@@ -72,7 +74,7 @@
 
 use vars qw( $VERSION $LOADED );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 $LOADED = 1;
 
 ##############################################################################

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath.pm Fri Jan  8 15:48:06 2010
@@ -22,11 +22,11 @@
 
 package XML::Stream::XPath;
 
-use 5.006_001;
+use 5.008;
 use strict;
 use vars qw( $VERSION %FUNCTIONS );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 
 use XML::Stream::XPath::Value;
 use XML::Stream::XPath::Op;

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Op.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Op.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Op.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Op.pm Fri Jan  8 15:48:06 2010
@@ -28,11 +28,11 @@
 ##############################################################################
 package XML::Stream::XPath::Op;
 
-use 5.006_001;
+use 5.008;
 use strict;
 use vars qw( $VERSION );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 
 sub new
 {

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Query.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Query.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Query.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Query.pm Fri Jan  8 15:48:06 2010
@@ -22,12 +22,12 @@
 
 package XML::Stream::XPath::Query;
 
-use 5.006_001;
+use 5.008;
 use strict;
 use Carp;
 use vars qw( $VERSION );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 
 sub new
 {

Modified: branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Value.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Value.pm?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Value.pm (original)
+++ branches/upstream/libxml-stream-perl/current/lib/XML/Stream/XPath/Value.pm Fri Jan  8 15:48:06 2010
@@ -22,11 +22,11 @@
 
 package XML::Stream::XPath::Value;
 
-use 5.006_001;
+use 5.008;
 use strict;
 use vars qw( $VERSION );
 
-$VERSION = "1.22";
+$VERSION = "1.23";
 
 sub new
 {

Added: branches/upstream/libxml-stream-perl/current/t/0-signature.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/t/0-signature.t?rev=50530&op=file
==============================================================================
--- branches/upstream/libxml-stream-perl/current/t/0-signature.t (added)
+++ branches/upstream/libxml-stream-perl/current/t/0-signature.t Fri Jan  8 15:48:06 2010
@@ -1,0 +1,35 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More;
+
+if (!$ENV{TEST_SIGNATURE}) {
+    plan skip_all => 
+      "Set the environment variable TEST_SIGNATURE to enable this test.";
+}
+elsif (!eval { require Module::Signature; 1 }) {
+    plan skip_all => 
+      "Next time around, consider installing Module::Signature, ".
+      "so you can verify the integrity of this distribution.";
+}
+elsif ( !-e 'SIGNATURE' ) {
+    plan skip_all => "SIGNATURE not found";
+}
+elsif ( -s 'SIGNATURE' == 0 ) {
+    plan skip_all => "SIGNATURE file empty";
+}
+elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) {
+    plan skip_all => "Cannot connect to the keyserver to check module ".
+                     "signature";
+}
+else {
+    plan tests => 1;
+}
+
+my $ret = Module::Signature::verify();
+SKIP: {
+    skip "Module::Signature cannot verify", 1 
+      if $ret eq Module::Signature::CANNOT_VERIFY();
+
+    cmp_ok $ret, '==', Module::Signature::SIGNATURE_OK(), "Valid signature";
+}

Added: branches/upstream/libxml-stream-perl/current/t/cdata.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/t/cdata.t?rev=50530&op=file
==============================================================================
--- branches/upstream/libxml-stream-perl/current/t/cdata.t (added)
+++ branches/upstream/libxml-stream-perl/current/t/cdata.t Fri Jan  8 15:48:06 2010
@@ -1,0 +1,26 @@
+use lib './lib';
+use Test::More tests => 5;
+
+use strict;
+
+BEGIN { use_ok('XML::Stream', 'Node'); }
+
+my $a = new XML::Stream::Node;
+$a->set_tag("body");
+$a->add_cdata("one");
+
+is ($a->GetXML(), q[<body>one</body>], 'cdata');
+
+my $b = $a->copy;
+
+is ($b->GetXML(), q[<body>one</body>], 'copy cdata');
+
+$a->add_child("a","two")->put_attrib(href=>"http://www.google.com");
+$a->add_cdata("three");
+
+is ($a->GetXML(), q[<body>one<a href='http://www.google.com'>two</a>three</body>], 'cdata/element/cdata');
+
+my $c = $a->copy;
+
+is ($c->GetXML(), q[<body>one<a href='http://www.google.com'>two</a>three</body>], 'copy cdata/element/cdata');
+

Added: branches/upstream/libxml-stream-perl/current/t/quotes.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/t/quotes.t?rev=50530&op=file
==============================================================================
--- branches/upstream/libxml-stream-perl/current/t/quotes.t (added)
+++ branches/upstream/libxml-stream-perl/current/t/quotes.t Fri Jan  8 15:48:06 2010
@@ -1,0 +1,39 @@
+use lib './lib';
+use Test::More tests => 3;
+
+use strict;
+
+# Test for RT#17325
+
+BEGIN { use_ok('XML::Stream', 'Parser'); }
+
+my @test_strings = (
+    {
+        xml     => q[<presence xmlns='jabber:client' from='sparrow at itn.pl/PowerBook G4 15"' to='jogger at jogger.pl'><show>away</show><status>Away</status></presence>],
+        message => 'one double quote',
+    },
+    {
+        xml     => q[<presence xmlns="jabber:client" from="sparrow at itn.pl/PowerBook G4 15'" to="jogger at jogger.pl"><show>away</show><status>Away</status></presence>],
+        message => 'one single quote',
+    }
+);
+
+foreach my $test_string ( @test_strings ) {
+    my $p = XML::Stream::Parser->new();
+    my $return;
+    my $message = $test_string->{'message'};
+
+    # The nature of the bug which this test aims to prove is such that an
+    # infinite loop is caused on failure, hence this timeout code
+    eval {
+        local $SIG{ALRM} = sub { die "TIMED OUT\n" };
+        alarm 3;
+        $return = $p->parse( $test_string->{'xml'} );
+    } or do {
+        $return = '';
+        $message .= ' - ' . $@;
+    };
+
+    isa_ok ( $return, 'ARRAY', $message );
+}
+

Modified: branches/upstream/libxml-stream-perl/current/t/tcpip.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/t/tcpip.t?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/t/tcpip.t (original)
+++ branches/upstream/libxml-stream-perl/current/t/tcpip.t Fri Jan  8 15:48:06 2010
@@ -9,10 +9,10 @@
 
 SKIP:
 {
-    my $sock = IO::Socket::INET->new(PeerAddr=>'obelisk.net:5222');
+    my $sock = IO::Socket::INET->new(PeerAddr=>'jabber.org:5222');
     skip "Cannot open connection (maybe a firewall?)",1 unless defined($sock);
     
-    my $status = $stream->Connect(hostname=>"obelisk.net",
+    my $status = $stream->Connect(hostname=>"jabber.org",
                                   port=>5222,
                                   namespace=>"jabber:client",
                                   connectiontype=>"tcpip",

Modified: branches/upstream/libxml-stream-perl/current/t/tcpip2ssl.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-stream-perl/current/t/tcpip2ssl.t?rev=50530&op=diff
==============================================================================
--- branches/upstream/libxml-stream-perl/current/t/tcpip2ssl.t (original)
+++ branches/upstream/libxml-stream-perl/current/t/tcpip2ssl.t Fri Jan  8 15:48:06 2010
@@ -15,7 +15,7 @@
     SKIP:
     {
 
-        my $status = $stream->Connect(hostname=>"obelisk.net",
+        my $status = $stream->Connect(hostname=>"jabber.org",
                                       port=>5223,
                                       namespace=>"jabber:client",
                                       connectiontype=>"tcpip",




More information about the Pkg-perl-cvs-commits mailing list