r25933 - in /branches/upstream/librpc-xml-perl/current: ChangeLog ChangeLog.xml META.yml Makefile.PL README SIGNATURE lib/RPC/XML/Parser.pm t/20_parser.t t/40_server.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Oct 11 12:26:33 UTC 2008


Author: gregoa
Date: Sat Oct 11 12:26:31 2008
New Revision: 25933

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25933
Log:
[svn-upgrade] Integrating new upstream version, librpc-xml-perl (0.64)

Modified:
    branches/upstream/librpc-xml-perl/current/ChangeLog
    branches/upstream/librpc-xml-perl/current/ChangeLog.xml
    branches/upstream/librpc-xml-perl/current/META.yml
    branches/upstream/librpc-xml-perl/current/Makefile.PL
    branches/upstream/librpc-xml-perl/current/README
    branches/upstream/librpc-xml-perl/current/SIGNATURE
    branches/upstream/librpc-xml-perl/current/lib/RPC/XML/Parser.pm
    branches/upstream/librpc-xml-perl/current/t/20_parser.t
    branches/upstream/librpc-xml-perl/current/t/40_server.t

Modified: branches/upstream/librpc-xml-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/ChangeLog?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/ChangeLog (original)
+++ branches/upstream/librpc-xml-perl/current/ChangeLog Sat Oct 11 12:26:31 2008
@@ -1,4 +1,19 @@
 Revision history for Perl extension RPC::XML.
+
+0.64	Mon Sep 29 04:20:02 PDT 2008
+
+	t/40_server.t:
+	Further flexibility on the test of $srv->url(). This should (finally)
+	catch any variation of 127.* address and/or host/domain naming that
+	aliases to "localhost".
+
+	lib/RPC/XML/Parser.pm:
+	t/20_parser.t:
+	Lingering problem from RT ticket #30354, RPC::XML::Parser did not get
+	the change committed that included parser-level support for <i8>. Also
+	added tests for parsing RPC::XML::request objects and all the data-type
+	objects to the parser test suite (had they been there before, I would
+	have caught this myself).
 
 0.63	Fri Sep 19 02:22:26 PDT 2008
 

Modified: branches/upstream/librpc-xml-perl/current/ChangeLog.xml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/ChangeLog.xml?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/ChangeLog.xml (original)
+++ branches/upstream/librpc-xml-perl/current/ChangeLog.xml Sat Oct 11 12:26:31 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?><!-- :tabSize=2:indentSize=2:wrap=hard: -->
 <!--
     The schema for this namespace may be found at the following URL:
 
@@ -17,6 +17,31 @@
     extensions to the base protocol in terms of supporting HTTP/1.1 and
     allowing choice of character-set encodings for XML messages.
   </description>
+  <release date="2008-09-29T04:15:00-07:00" version="0.64" tag="v0_64">
+    <change>
+      <file path="t/40_server.t" revision="361" />
+      <description>
+        Further flexibility on the test of $srv->url(). This should (finally)
+        catch any variation of 127.* address and/or host/domain naming that
+        aliases to "localhost".
+      </description>
+    </change>
+    <change>
+      <fileset>
+        <file path="lib/RPC/XML/Parser.pm" revision="363" />
+        <file path="t/20_parser.t" revision="363" />
+      </fileset>
+      <description>
+        Lingering problem from
+        <xhtml:a href="http://rt.cpan.org/Ticket/Display.html?id=30354">RT ticket #30354</xhtml:a>,
+        RPC::XML::Parser did not get the change committed that included
+        parser-level support for &lt;i8&gt;. Also added tests for parsing
+        RPC::XML::request objects and all the data-type objects to the parser
+        test suite (had they been there before, I would have caught this
+        myself).
+      </description>
+    </change>
+  </release>
   <release date="2008-09-19T02:23:12-07:00" version="0.63" tag="v0_63">
     <change>
       <file path="lib/RPC/XML.pm" revision="359" />
@@ -41,6 +66,7 @@
         correctly on true 64-bit machines. Turns out I had bogus values for
         the maximums and minimums, not just for 8-byte ints but also for plain
         4-byte ones as well.
+      </description>
     </change>
   </release>
   <release version="0.61" tag="v0_61" date="2008-09-15T01:38:44-07:00">

Modified: branches/upstream/librpc-xml-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/META.yml?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/META.yml (original)
+++ branches/upstream/librpc-xml-perl/current/META.yml Sat Oct 11 12:26:31 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                RPC-XML
-version:             0.63
+version:             0.64
 abstract:            Data, client and server classes for XML-RPC
 license:             perl
 author:              

Modified: branches/upstream/librpc-xml-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/Makefile.PL?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/Makefile.PL (original)
+++ branches/upstream/librpc-xml-perl/current/Makefile.PL Sat Oct 11 12:26:31 2008
@@ -86,7 +86,7 @@
 
 WriteMakefile(
               NAME      => 'RPC::XML',
-              VERSION   => '0.63',
+              VERSION   => '0.64',
               AUTHOR    => 'Randy J. Ray',
               ABSTRACT  => 'Data, client and server classes for XML-RPC',
               EXE_FILES => \@scripts,

Modified: branches/upstream/librpc-xml-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/README?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/README (original)
+++ branches/upstream/librpc-xml-perl/current/README Sat Oct 11 12:26:31 2008
@@ -1,6 +1,6 @@
 RPC::XML - An implementation of XML-RPC
 
-Version: 0.63
+Version: 0.64
 
 WHAT IS IT
 
@@ -66,6 +66,15 @@
 
 CHANGES
 
-lib/RPC/XML.pm:
-Forgot to increment $VERSION before the previous commit. Won't show up
-in CPAN as an available update otherwise.
+t/40_server.t:
+Further flexibility on the test of $srv->url(). This should (finally)
+catch any variation of 127.* address and/or host/domain naming that
+aliases to "localhost".
+
+lib/RPC/XML/Parser.pm:
+t/20_parser.t:
+Lingering problem from RT ticket #30354, RPC::XML::Parser did not get
+the change committed that included parser-level support for <i8>. Also
+added tests for parsing RPC::XML::request objects and all the data-type
+objects to the parser test suite (had they been there before, I would
+have caught this myself).

Modified: branches/upstream/librpc-xml-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/SIGNATURE?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/SIGNATURE (original)
+++ branches/upstream/librpc-xml-perl/current/SIGNATURE Sat Oct 11 12:26:31 2008
@@ -14,12 +14,12 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 43181cc02c237a7690c5bcb80d781e8346800ed7 ChangeLog
-SHA1 2793c6f91ce2fa915b9e89713020648d47ed3453 ChangeLog.xml
+SHA1 a988b1c1a966b2aaebda457aab35bb55fad0d617 ChangeLog
+SHA1 2fccd6cf81b8406be164a6a2fd046b02f05955c0 ChangeLog.xml
 SHA1 41b699bccfd786c450e4692e9e22582d1a1843a2 MANIFEST
-SHA1 cc4656c1e5cbb17e730bde5324cc7f84a63c7853 META.yml
-SHA1 04229bec1a832b81931fd76e054876f43379587d Makefile.PL
-SHA1 590de6d24c15172e64a4066849ad68157d426191 README
+SHA1 d8296098db22e1ad62d7f21335b2ffa23afddbe9 META.yml
+SHA1 16bcfc2e71803ddc59c3d00719dba31fcef01469 Makefile.PL
+SHA1 8669d51e186d98c148f48693e9410f7134b4e7f1 README
 SHA1 d210d832fa02c0f0b79d7c5c65c4a72c3315e230 README.apache2
 SHA1 49d6758504cb1cf0d279eb6639d8ff1bb429c5ef etc/make_method
 SHA1 fcd7b5481af620c338d25ecf907913bac5e5626b etc/rpc-method.dtd
@@ -40,7 +40,7 @@
 SHA1 35245166b780207bca64e41fe1fcc111e9edbbee lib/RPC/XML/Client.pm
 SHA1 358517173bfa315f4e542a7e021b539945b95ad3 lib/RPC/XML/Function.pm
 SHA1 72cd305bba92d52533e77b6dd539426e1299dcea lib/RPC/XML/Method.pm
-SHA1 c0678fc22c4efc441fbecd981e6582f0e9b5ce34 lib/RPC/XML/Parser.pm
+SHA1 06a1fdfb3fd1807cdd1e8ffb3d8be09db9010f36 lib/RPC/XML/Parser.pm
 SHA1 bdbef5cd5f3133d21edf92b6b6d8f7dfcc1e720e lib/RPC/XML/Procedure.pm
 SHA1 1fdc2ba2aa8e06abc3300ca7db7ff82636a9f5bf lib/RPC/XML/Server.pm
 SHA1 3b1b1815be69edabfad34b45f93259aeab6e314e methods/identity.base
@@ -70,9 +70,9 @@
 SHA1 2e8c0d4179ea750ede4e3ee4d6e61d205cefac40 t/10_data.t
 SHA1 ce1bafc9f5bfc98a540bb4b8c94fdcda1a805d16 t/11_base64_fh.t
 SHA1 fdf777af8e23527d58f7ede763386fe8f1d9f7f4 t/15_serialize.t
-SHA1 72daddabf96ea76b444e69667d64f062e37f3ef2 t/20_parser.t
+SHA1 70fee7ac5a62b7e6964d79dbfef8f6d2ee18b753 t/20_parser.t
 SHA1 d8ce577d9cc61f6c8395b4509fed147aaec6c9e7 t/30_method.t
-SHA1 115f16615f305c40346b64e36f598bd824c22fb8 t/40_server.t
+SHA1 9710a14b613d3622ec80693f7da11ff3f40bff2a t/40_server.t
 SHA1 bb1a8feb339903fcd58bf86befbd01369376f5d9 t/41_server_hang.t
 SHA1 159ed7848b0ce5a384836bff599855dfa82550e1 t/50_client.t
 SHA1 5e37b1e221d1548b1c9b2784ca79e3ac90eb0e5d t/60_net_server.t
@@ -84,7 +84,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFI03BNI8xldGuPhcoRAlCSAJ4hPOzMKsbg6ZBMO2Lcm8P7CTzVDwCeMIpk
-kU4LA7z7tUOu5KCGV5ZZ+5U=
-=DWjn
+iD8DBQFI4LrcI8xldGuPhcoRAqucAKCG++sGWGEIOxb8KJv8nKIU0X6T6ACdG7vW
+rylT2WWjx6g0AFZBZ8p+xG0=
+=VGA6
 -----END PGP SIGNATURE-----

Modified: branches/upstream/librpc-xml-perl/current/lib/RPC/XML/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/lib/RPC/XML/Parser.pm?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/lib/RPC/XML/Parser.pm (original)
+++ branches/upstream/librpc-xml-perl/current/lib/RPC/XML/Parser.pm Sat Oct 11 12:26:31 2008
@@ -6,7 +6,7 @@
 #
 ###############################################################################
 #
-#   $Id: Parser.pm 343 2008-04-09 09:54:36Z rjray $
+#   $Id: Parser.pm 363 2008-09-29 10:56:48Z rjray $
 #
 #   Description:    This is the RPC::XML::Parser class, a container for the
 #                   XML::Parser class. It was moved here from RPC::XML in
@@ -67,7 +67,7 @@
 use constant FAULTSTART  => 22;
 
 # This is to identify valid types
-use constant VALIDTYPES  => { map { $_, 1 } qw(int i4 string double
+use constant VALIDTYPES  => { map { $_, 1 } qw(int i4 i8 string double
                                                boolean dateTime.iso8601
                                                base64) };
 # This maps XML tags to stack-machine tokens
@@ -97,7 +97,7 @@
 
 require RPC::XML;
 
-$VERSION = '1.15';
+$VERSION = '1.16';
 
 ###############################################################################
 #
@@ -308,7 +308,7 @@
         # Cheaper than the regex that was here, and more locale-portable
         $class = 'datetime_iso8601' if ($class eq 'dateTime.iso8601');
         # Some minimal data-integrity checking
-        if ($class eq 'int' or $class eq 'i4')
+        if ($class eq 'int' or $class eq 'i4' or $class eq 'i8')
         {
             return error($robj, $self, 'Bad integer data read')
                 unless ($cdata =~ /^[-+]?\d+$/);

Modified: branches/upstream/librpc-xml-perl/current/t/20_parser.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/t/20_parser.t?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/t/20_parser.t (original)
+++ branches/upstream/librpc-xml-perl/current/t/20_parser.t Sat Oct 11 12:26:31 2008
@@ -1,12 +1,12 @@
 #!/usr/bin/perl
-# $Id: 20_parser.t 339 2008-03-30 17:49:20Z rjray $
+# $Id: 20_parser.t 363 2008-09-29 10:56:48Z rjray $
 
 # Test the XML::Parser container
 
 use strict;
 use vars qw($p $req $res $ret $dir $file);
 
-use Test::More tests => 14;
+use Test::More tests => 35;
 require File::Spec;
 require IO::File;
 
@@ -40,6 +40,55 @@
 ok(! ref($ret), 'Bad XML did not parse');
 like($ret, qr/Unknown tag/, 'Parse failure returned error');
 
+# Make sure that the parser can handle all of the core data-types. Easiest way
+# to do this is to create a fake request with a parameter of each type (except
+# base64, which is getting exercised later on).
+$req = RPC::XML::request->new(
+    'parserTest',
+    RPC::XML::i4->new(1),
+    RPC::XML::int->new(2),
+    RPC::XML::i8->new(3),
+    RPC::XML::double->new(4.5),
+    RPC::XML::string->new('string'),
+    RPC::XML::boolean->new('true'),
+    RPC::XML::datetime_iso8601->new('2008-09-29T12:00:00-07:00'),
+    [ 0, 1 ], # Array, auto-encoded
+    { a => 1, b => 2 }, # Hash/struct, also auto-encoded
+);
+$ret = $p->parse($req->as_string);
+isa_ok($ret, 'RPC::XML::request', 'Parse of RPC::XML::request block');
+SKIP: {
+    skip "RPC::XML::request object not properly parsed, cannot test it.", 20
+        unless (ref($ret) eq 'RPC::XML::request');
+
+    is($ret->name, 'parserTest', 'Properly parsed /methodCall/methodName');
+    my $args = $ret->args;
+    is(scalar @$args, 9, 'Parser created correct-length args list');
+    # I could (and should) probably turn this into a loop with a table of
+    # data, but I'm lazy right this moment.
+    isa_ok($args->[0], 'RPC::XML::i4', 'Parse of <i4> argument');
+    is($args->[0]->value, 1, 'RPC::XML::i4 value parsed OK');
+    isa_ok($args->[1], 'RPC::XML::int', 'Parse of <int> argument');
+    is($args->[1]->value, 2, 'RPC::XML::int value parsed OK');
+    isa_ok($args->[2], 'RPC::XML::i8', 'Parse of <i8> argument');
+    is($args->[2]->value, 3, 'RPC::XML::i8 value parsed OK');
+    isa_ok($args->[3], 'RPC::XML::double', 'Parse of <double> argument');
+    is($args->[3]->value, 4.5, 'RPC::XML::double value parsed OK');
+    isa_ok($args->[4], 'RPC::XML::string', 'Parse of <string> argument');
+    is($args->[4]->value, 'string', 'RPC::XML::string value parsed OK');
+    isa_ok($args->[5], 'RPC::XML::boolean', 'Parse of <boolean> argument');
+    ok($args->[5]->value, 'RPC::XML::boolean value parsed OK');
+    isa_ok($args->[6], 'RPC::XML::datetime_iso8601',
+           'Parse of <dateTime.iso8601> argument');
+    is($args->[6]->value, '2008-09-29T12:00:00-07:00',
+       'RPC::XML::dateTime.iso8601 value parsed OK');
+    isa_ok($args->[7], 'RPC::XML::array', 'Parse of <array> argument');
+    is(scalar(@{$args->[7]->value}), 2, 'RPC::XML::array value parsed OK');
+    isa_ok($args->[8], 'RPC::XML::struct', 'Parse of <struct> argument');
+    is(scalar(keys %{$args->[8]->value}), 2,
+       'RPC::XML::struct value parsed OK');
+}
+
 # Prior to this, we've confirmed that spooling base64 data to files works.
 # Here, we test whether the parser (when configured to do so) can create
 # filehandles as well.

Modified: branches/upstream/librpc-xml-perl/current/t/40_server.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librpc-xml-perl/current/t/40_server.t?rev=25933&op=diff
==============================================================================
--- branches/upstream/librpc-xml-perl/current/t/40_server.t (original)
+++ branches/upstream/librpc-xml-perl/current/t/40_server.t Sat Oct 11 12:26:31 2008
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: 40_server.t 355 2008-09-19 09:06:51Z rjray $
+# $Id: 40_server.t 361 2008-09-23 09:44:19Z rjray $
 
 # Test the RPC::XML::Server class
 
@@ -57,8 +57,14 @@
 isa_ok($srv, 'RPC::XML::Server', '$srv<2>');
 # Test the URL the server uses. Allow for "localhost", "localhost.localdomain"
 # or the local-net IP address of this host (not always 127.0.0.1).
-my $localIP = join('.', unpack('C4', (gethostbyname('localhost'))[4]));
-like($srv->url, qr{http://(localhost(\.localdomain)?|$localIP):$port},
+# 22/09/2008 - Just allow for anything the user has attached to this address.
+#              Aliases keep causing this test to falsely fail.
+my @localhostinfo = gethostbyname('localhost');
+my $localIP = join('.', unpack('C4', $localhostinfo[4]));
+my @allhosts = ($localIP, $localhostinfo[0], split(' ', $localhostinfo[1]));
+for (@allhosts) { s/\./\\./g }
+my $allhosts = join('|', @allhosts);
+like($srv->url, qr{http://($allhosts):$port},
    'RPC::XML::Server::url method (set)'); # This should be non-null this time
 # Test some of the simpler cases of add_method and get_method
 $res = $srv->add_method({ name      => 'perl.test.suite.test1',




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