r2942 - in /packages/librpc-xml-perl/branches/upstream/current: ChangeLog ChangeLog.xml META.yml Makefile.PL README etc/make_method lib/RPC/XML.pm lib/RPC/XML/Procedure.pm lib/RPC/XML/Server.pm t/10_data.t

dam-guest at users.alioth.debian.org dam-guest at users.alioth.debian.org
Mon Jun 12 19:39:26 UTC 2006


Author: dam-guest
Date: Mon Jun 12 19:39:23 2006
New Revision: 2942

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=2942
Log:
Load /tmp/tmp.mtPDzl6505/librpc-xml-perl-0.58 into
packages/librpc-xml-perl/branches/upstream/current.

Modified:
    packages/librpc-xml-perl/branches/upstream/current/ChangeLog
    packages/librpc-xml-perl/branches/upstream/current/ChangeLog.xml
    packages/librpc-xml-perl/branches/upstream/current/META.yml
    packages/librpc-xml-perl/branches/upstream/current/Makefile.PL
    packages/librpc-xml-perl/branches/upstream/current/README
    packages/librpc-xml-perl/branches/upstream/current/etc/make_method   (props changed)
    packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML.pm
    packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Procedure.pm
    packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Server.pm
    packages/librpc-xml-perl/branches/upstream/current/t/10_data.t

Modified: packages/librpc-xml-perl/branches/upstream/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/ChangeLog?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/ChangeLog (original)
+++ packages/librpc-xml-perl/branches/upstream/current/ChangeLog Mon Jun 12 19:39:23 2006
@@ -1,4 +1,27 @@
 Revision history for Perl extension RPC::XML.
+
+0.58	Thu May 12 03:24:23 PDT 2005
+
+	lib/RPC/XML.pm:
+	t/10_data.t:
+	Applied patches from Stephen Veiss to fix a small bug in the encoding
+	method of RPC::XML::string. Trying to encode the literal string "0"
+	would result in a null string. The patches provided the fix and a
+	specific test-case for the related suite.
+
+	lib/RPC/XML/Procedure.pm:
+	lib/RPC/XML/Server.pm:
+	Applied a patch from Mike Pomraning to allow user-level functions to
+	return RPC::XML::fault objects directly without them being further
+	wrapped by intermediate layers.
+
+	lib/RPC/XML/Procedure.pm:
+	Implemented a modified version of a patch from Lubomir Host that
+	addresses an intermittent IOCTL problem when reading XPL files.
+
+	Makefile.PL:
+	Incremented package version number and put in warning of the impending
+	move to XML::LibXML.
 
 0.57	Fri Dec 24 03:02:48 PST 2004
 

Modified: packages/librpc-xml-perl/branches/upstream/current/ChangeLog.xml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/ChangeLog.xml?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/ChangeLog.xml (original)
+++ packages/librpc-xml-perl/branches/upstream/current/ChangeLog.xml Mon Jun 12 19:39:23 2006
@@ -4,12 +4,55 @@
 
     http://www.blackperl.com/XML/ChangeLog/changelog092.xsd
 
-    $Header: /work/cvs/perl/RPC-XML/ChangeLog.xml,v 1.3 2004/12/24 11:03:53 rjray Exp $
+    $Header: /work/cvs/perl/RPC-XML/ChangeLog.xml,v 1.4 2005/05/12 10:40:16 rjray Exp $
 -->
 <changelog xmlns="http://www.blackperl.com/XML/ChangeLog">
   <description>
-    Revision history for Perl extension RPC::XML
+    Revision history for the Perl extension module RPC::XML. This is an
+    implementation of the XML-RPC standard as described at the URL
+    "http://www.xmlrpc.com". This implementation also permits some minor
+    extensions to the base protocol in terms of supporting HTTP/1.1 and
+    allowing choice of character-set encodings for XML messages.
   </description>
+  <release version="0.58" tag="v0_58" date="2005-05-12T03:24:23-07:00">
+    <item>
+      <fileset>
+        <file path="lib/RPC/XML.pm" revision="1.35" />
+        <file path="t/10_data.t" revision="1.9" />
+      </fileset>
+      <description>
+        Applied patches from Stephen Veiss to fix a small bug in the encoding
+        method of RPC::XML::string. Trying to encode the literal string "0"
+        would result in a null string. The patches provided the fix and a
+        specific test-case for the related suite.
+      </description>
+    </item>
+    <item>
+      <fileset>
+        <file path="lib/RPC/XML/Procedure.pm" revision="1.13" />
+        <file path="lib/RPC/XML/Server.pm" revision="1.43" />
+      </fileset>
+      <description>
+        Applied a patch from Mike Pomraning to allow user-level functions to
+        return RPC::XML::fault objects directly without them being further
+        wrapped by intermediate layers.
+      </description>
+    </item>
+    <item>
+      <file path="lib/RPC/XML/Procedure.pm" revision="1.14" />
+      <description>
+        Implemented a modified version of a patch from Lubomir Host that
+        addresses an intermittent IOCTL problem when reading XPL files.
+      </description>
+    </item>
+    <item>
+      <file path="Makefile.PL" revision="1.38" />
+      <description>
+        Incremented package version number and put in warning of the impending
+        move to XML::LibXML.
+      </description>
+    </item>
+  </release>
   <release version="0.57" tag="v0_57" date="2004-12-24T03:02:48-08:00">
     <item>
       <file path="lib/Apache/RPC/Server.pm" revision="1.27" />
@@ -20,8 +63,8 @@
     </item>
     <item>
       <fileset>
-        <file path="lib/RPC/XML.pm" version="1.34" />
-        <file path="t/10_data.t" version="1.8" />
+        <file path="lib/RPC/XML.pm" revision="1.34" />
+        <file path="t/10_data.t" revision="1.8" />
       </fileset>
       <description>
         Based on a report from Brian Phillips, made adjustments in the

Modified: packages/librpc-xml-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/META.yml?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/META.yml (original)
+++ packages/librpc-xml-perl/branches/upstream/current/META.yml Mon Jun 12 19:39:23 2006
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         RPC-XML
-version:      0.57
+version:      0.58
 version_from: 
 installdirs:  site
 requires:
@@ -10,4 +10,4 @@
     XML::Parser:                   2.25
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.24
+generated_by: ExtUtils::MakeMaker version 6.28

Modified: packages/librpc-xml-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/Makefile.PL?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/Makefile.PL (original)
+++ packages/librpc-xml-perl/branches/upstream/current/Makefile.PL Mon Jun 12 19:39:23 2006
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# $Id: Makefile.PL,v 1.37 2004/12/24 11:03:53 rjray Exp $
+# $Id: Makefile.PL,v 1.38 2005/05/12 10:36:37 rjray Exp $
 #
 # This is the MakeMaker skeleton for the RPC-XML extension. Besides the usual
 # tricks, this has to add rules to make the *.xpl files from *.code in the
@@ -24,6 +24,24 @@
 	feature of RPC::XML::Client is broken. The relevant tests will be
 	skipped in the test suite, but unless you upgrade your LWP you
 	should not attempt to use this feature.
+@@@@@
+
+END
+}
+
+eval "use XML::LibXML;";
+if ($@ or $XML::LibXML::VERSION < 1.58)
+{
+    print STDERR <<END;
+@@@@@
+	Please note!
+
+	Starting with release 0.60 (two releases from this one), the XML
+	parsing will switch to using the XML::LibXML module, in place of
+	XML::Parser. You either do not have this module, or it is a version
+	older than 1.58, the minimum version that will be required. When
+	release 0.60 is made available, you will not be able to build this
+	package without at least version 1.58 of XML::LibXML.
 @@@@@
 
 END
@@ -67,7 +85,7 @@
 
 WriteMakefile(
               NAME      => 'RPC::XML',
-              VERSION   => '0.57',
+              VERSION   => '0.58',
               AUTHOR    => 'Randy J. Ray',
               ABSTRACT  => 'Data, client and server classes for XML-RPC',
               EXE_FILES => \@scripts,

Modified: packages/librpc-xml-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/README?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/README (original)
+++ packages/librpc-xml-perl/branches/upstream/current/README Mon Jun 12 19:39:23 2006
@@ -1,6 +1,6 @@
 RPC::XML - An implementation of XML-RPC
 
-Version: 0.57
+Version: 0.58
 
 WHAT IS IT
 
@@ -65,31 +65,24 @@
 
 CHANGES
 
-lib/Apache/RPC/Server.pm:
-Some minor changes to how values are read from the configuration, to
-reduce "use of uninitialized value" warnings in regex operations.
-
 lib/RPC/XML.pm:
 t/10_data.t:
-Based on a report from Brian Phillips, made adjustments in the
-smart_encode helper-routine to deal with blessed references. Anything
-that is derived from HASH or ARRAY is encoded as a struct or array,
-respectively. Anything derived from SCALAR is dereferenced and encoded
-as per usual. Carried this over to the class constructors, with special
-attention to the RPC::XML::simple_type class. Added tests to the suite
-for all of this, as well.
+Applied patches from Stephen Veiss to fix a small bug in the encoding
+method of RPC::XML::string. Trying to encode the literal string "0"
+would result in a null string. The patches provided the fix and a
+specific test-case for the related suite.
 
-lib/Apache/RPC/status.base:
-lib/Apache/RPC/status.code:
-lib/Apache/RPC/status.help:
 lib/RPC/XML/Procedure.pm:
 lib/RPC/XML/Server.pm:
-methods/status.base:
-methods/status.code:
-methods/status.help:
-t/40_server.t:
-The "system.status" method (both the general one and the one that is
-specific to Apache) now recognizes an optional boolean parameter that
-can keep the status call from counting against the "total_requests"
-struct value. This is to allow external monitors (status, health, etc.)
-to use that call without running up the value of that field needlessly.
+Applied a patch from Mike Pomraning to allow user-level functions to
+return RPC::XML::fault objects directly without them being further
+wrapped by intermediate layers.
+
+lib/RPC/XML/Procedure.pm:
+Implemented a modified version of a patch from Lubomir Host that
+addresses an intermittent IOCTL problem when reading XPL files.
+
+Makefile.PL:
+Incremented package version number and put in warning of the impending
+move to XML::LibXML.
+

Propchange: packages/librpc-xml-perl/branches/upstream/current/etc/make_method
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Mon Jun 12 19:39:23 2006
@@ -1,0 +1,1 @@
+*

Modified: packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML.pm?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML.pm (original)
+++ packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML.pm Mon Jun 12 19:39:23 2006
@@ -9,7 +9,7 @@
 #
 ###############################################################################
 #
-#   $Id: XML.pm,v 1.34 2004/12/17 09:42:37 rjray Exp $
+#   $Id: XML.pm,v 1.35 2005/05/02 09:37:56 rjray Exp $
 #
 #   Description:    This module provides the core XML <-> RPC conversion and
 #                   structural management.
@@ -66,7 +66,7 @@
                               RPC_DATETIME_ISO8601 RPC_BASE64) ],
                 all   => [ @EXPORT_OK ]);
 
-$VERSION = do { my @r=(q$Revision: 1.34 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
+$VERSION = do { my @r=(q$Revision: 1.35 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
 
 # Global error string
 $ERROR = '';
@@ -316,7 +316,8 @@
 
     return unless ($class = $self->type);
 
-    ($value = $$self || '') =~ s/$RPC::XML::xmlre/$RPC::XML::xmlmap{$1}/ge;
+    ($value = defined $$self ? $$self : '' )
+        =~ s/$RPC::XML::xmlre/$RPC::XML::xmlmap{$1}/ge;
 
     "<$class>$value</$class>";
 }
@@ -1292,9 +1293,7 @@
 
 =head1 DESCRIPTION
 
-The B<RPC::XML> package is a reference implementation of the XML-RPC
-standard. As a reference implementation, it is geared more towards clarity and
-readability than efficiency.
+The B<RPC::XML> package is an implementation of the B<XML-RPC> standard.
 
 The package provides a set of classes for creating values to pass to the
 constructors for requests and responses. These are lightweight objects, most
@@ -1616,8 +1615,8 @@
 
 =head1 DIAGNOSTICS
 
-All constructors return C<undef> upon failure, with the error message available
-in the package-global variable B<C<$RPC::XML::ERROR>>.
+All constructors (in all data classes) return C<undef> upon failure, with the
+error message available in the package-global variable B<C<$RPC::XML::ERROR>>.
 
 =head1 CAVEATS
 
@@ -1629,13 +1628,13 @@
 =head1 CREDITS
 
 The B<XML-RPC> standard is Copyright (c) 1998-2001, UserLand Software, Inc.
-See <http://www.xmlrpc.com> for more information about the B<XML-RPC>
+See L<http://www.xmlrpc.com> for more information about the B<XML-RPC>
 specification.
 
 =head1 LICENSE
 
 This module is licensed under the terms of the Artistic License that covers
-Perl. See <http://www.opensource.org/licenses/artistic-license.php> for the
+Perl. See L<http://www.opensource.org/licenses/artistic-license.php> for the
 license itself.
 
 =head1 SEE ALSO

Modified: packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Procedure.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Procedure.pm?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Procedure.pm (original)
+++ packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Procedure.pm Mon Jun 12 19:39:23 2006
@@ -8,7 +8,7 @@
 #
 ###############################################################################
 #
-#   $Id: Procedure.pm,v 1.12 2004/12/14 10:01:24 rjray Exp $
+#   $Id: Procedure.pm,v 1.14 2005/05/02 10:03:10 rjray Exp $
 #
 #   Description:    This class abstracts out all the procedure-related
 #                   operations from the RPC::XML::Server class
@@ -50,7 +50,7 @@
 use AutoLoader 'AUTOLOAD';
 require File::Spec;
 
-$VERSION = do { my @r=(q$Revision: 1.12 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
+$VERSION = do { my @r=(q$Revision: 1.14 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
 
 ###############################################################################
 #
@@ -432,10 +432,10 @@
 B<RPC::XML::Server> class. For some types of procedure objects, this becomes
 the first argument of the parameter list to simulate a method call as if it
 were on the server object itself. The return value should be a data object
-(possible a B<RPC::XML::fault>), but may not always be pre-encoded. This
-method is generally used in the C<dispatch> method of the server class, where
-the return value is subsequently wrapped within a B<RPC::XML::response>
-object.
+(possibly a B<RPC::XML::fault>), but may not always be pre-encoded. Errors
+trapped in C<$@> are converted to fault objects. This method is generally used
+in the C<dispatch> method of the server class, where the return value is
+subsequently wrapped within a B<RPC::XML::response> object.
 
 =item reload
 
@@ -829,8 +829,7 @@
     # So these don't end up undef, since they're optional elements
     $data->{hidden} = 0; $data->{version} = ''; $data->{help} = '';
     $data->{called} = 0;
-    open(F, "< $file");
-    return "$me: Error opening $file for reading: $!" if ($?);
+    open(F, "< $file") or return "$me: Error opening $file for reading: $!";
     $P = XML::Parser
         ->new(Handlers => {Char  => sub { $accum .= $_[1] },
                            Start => sub { %attr = splice(@_, 2) },
@@ -870,6 +869,7 @@
     return "$me: Error creating XML::Parser object" unless $P;
     # Trap any errors
     eval { $P->parse(*F) };
+    close(F);
     return "$me: Error parsing $file: $@" if $@;
 
     # Try to normalize $codetext before passing it to eval
@@ -942,8 +942,14 @@
 
     # Now take a deep breath and call the method with the arguments
     eval { $response = $self->{code}->(@params); };
-    # Report a Perl-level error/failure if it occurs
-    return RPC::XML::fault->new(302, "Method $name returned error: $@") if $@;
+    # On failure, propagate user-generated RPC::XML::fault exceptions, or
+    # transform Perl-level error/failure into such an object
+    if ($@)
+    {
+        return UNIVERSAL::isa($@, 'RPC::XML::fault') ?
+            $@ :
+            RPC::XML::fault->new(302, "Method $name returned error: $@");
+    }
 
     $self->{called}++ unless $noinc;
     # Create a suitable return value

Modified: packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Server.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Server.pm?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Server.pm (original)
+++ packages/librpc-xml-perl/branches/upstream/current/lib/RPC/XML/Server.pm Mon Jun 12 19:39:23 2006
@@ -9,7 +9,7 @@
 #
 ###############################################################################
 #
-#   $Id: Server.pm,v 1.42 2004/12/14 10:01:24 rjray Exp $
+#   $Id: Server.pm,v 1.43 2005/05/02 09:50:16 rjray Exp $
 #
 #   Description:    This class implements an RPC::XML server, using the core
 #                   XML::RPC transaction code. The server may be created with
@@ -86,7 +86,7 @@
 require RPC::XML::Parser;
 require RPC::XML::Procedure;
 
-$VERSION = do { my @r=(q$Revision: 1.42 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
+$VERSION = do { my @r=(q$Revision: 1.43 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
 
 ###############################################################################
 #
@@ -740,11 +740,14 @@
 parameter data is extracted, as is the method name itself. The call is sent
 along to the appropriate subroutine, and the results are collated into an
 object of the B<RPC::XML::response> class, which is returned. Any non-reference
-return value should be presumed to be an error string. If the dispatched
-method encountered some sort of error, it will not be propagated upward here,
-but rather encoded as an object of the B<RPC::XML::fault> class, and returned
-as the result of the dispatch. This distinguishes between server-centric
-errors, and general run-time errors.
+return value should be presumed to be an error string.
+
+The dispatched method may communicate error in several ways.  First, any
+non-reference return value is presumed to be an error string, and is encoded
+and returned as an B<RPC::XML::fault> response.  The method is run under an
+C<eval()>, so errors conveyed by C<$@> are similarly encoded and returned.  As
+a special case, a method may explicitly C<die()> with a fault response, which
+is passed on unmodified.
 
 =item add_default_methods([DETAILS])
 

Modified: packages/librpc-xml-perl/branches/upstream/current/t/10_data.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/librpc-xml-perl/branches/upstream/current/t/10_data.t?rev=2942&op=diff
==============================================================================
--- packages/librpc-xml-perl/branches/upstream/current/t/10_data.t (original)
+++ packages/librpc-xml-perl/branches/upstream/current/t/10_data.t Mon Jun 12 19:39:23 2006
@@ -8,7 +8,7 @@
 use Test;
 use RPC::XML ':all';
 
-BEGIN { plan tests => 150 }
+BEGIN { plan tests => 151 }
 
 # First, the most basic data-types
 %val_tbl = (
@@ -57,6 +57,11 @@
 ok($obj->value, $val);
 ok($obj->as_string,
    "<string>Subroutine &amp;bogus not defined at &lt;_&gt; line -NaN</string>");
+
+# Test for correct handling of encoding a 0 (false but defined)
+$val = 0; 
+$obj = RPC::XML::string->new($val);
+ok($obj->as_string, "<string>0</string>");
 
 # Type boolean is a little funky
 




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