r26313 - in /branches/upstream/libevent-rpc-perl/current: Changes META.yml lib/Event/RPC.pm lib/Event/RPC/Connection.pm t/06.object2.t t/Event_RPC_Test2.pm t/Event_RPC_Test_Server.pm

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Tue Oct 28 21:28:45 UTC 2008


Author: rmayorga-guest
Date: Tue Oct 28 21:28:42 2008
New Revision: 26313

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26313
Log:
[svn-upgrade] Integrating new upstream version, libevent-rpc-perl (1.01)

Modified:
    branches/upstream/libevent-rpc-perl/current/Changes
    branches/upstream/libevent-rpc-perl/current/META.yml
    branches/upstream/libevent-rpc-perl/current/lib/Event/RPC.pm
    branches/upstream/libevent-rpc-perl/current/lib/Event/RPC/Connection.pm
    branches/upstream/libevent-rpc-perl/current/t/06.object2.t
    branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test2.pm
    branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test_Server.pm

Modified: branches/upstream/libevent-rpc-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libevent-rpc-perl/current/Changes?rev=26313&op=diff
==============================================================================
--- branches/upstream/libevent-rpc-perl/current/Changes (original)
+++ branches/upstream/libevent-rpc-perl/current/Changes Tue Oct 28 21:28:42 2008
@@ -1,6 +1,14 @@
-$Id: Changes,v 1.15 2008/06/21 12:44:49 joern Exp $
+$Id: Changes,v 1.17 2008/10/26 10:28:28 joern Exp $
 
 Revision history and release notes for Event::RPC:
+
+1.01 Sat Oct 25, 2008, joern
+    Bugfixes:
+    - Even objects returned by methods not declared as
+      an "object returner" where turned into Event::RPC
+      object handles instead of copying the complete
+      data structure to the client. Thanks for the report
+      to Alex <alex AT lokku.com>.
 
 1.00 Sat Jun 21, 2008, joern
     Notes:

Modified: branches/upstream/libevent-rpc-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libevent-rpc-perl/current/META.yml?rev=26313&op=diff
==============================================================================
--- branches/upstream/libevent-rpc-perl/current/META.yml (original)
+++ branches/upstream/libevent-rpc-perl/current/META.yml Tue Oct 28 21:28:42 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Event-RPC
-version:             1.00
+version:             1.01
 abstract:            ~
 license:             ~
 author:              ~

Modified: branches/upstream/libevent-rpc-perl/current/lib/Event/RPC.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libevent-rpc-perl/current/lib/Event/RPC.pm?rev=26313&op=diff
==============================================================================
--- branches/upstream/libevent-rpc-perl/current/lib/Event/RPC.pm (original)
+++ branches/upstream/libevent-rpc-perl/current/lib/Event/RPC.pm Tue Oct 28 21:28:42 2008
@@ -1,6 +1,6 @@
 package Event::RPC;
 
-$VERSION  = "1.00";
+$VERSION  = "1.01";
 $PROTOCOL = "1.00";
 
 sub crypt {

Modified: branches/upstream/libevent-rpc-perl/current/lib/Event/RPC/Connection.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libevent-rpc-perl/current/lib/Event/RPC/Connection.pm?rev=26313&op=diff
==============================================================================
--- branches/upstream/libevent-rpc-perl/current/lib/Event/RPC/Connection.pm (original)
+++ branches/upstream/libevent-rpc-perl/current/lib/Event/RPC/Connection.pm Tue Oct 28 21:28:42 2008
@@ -386,6 +386,8 @@
 
 	}
 	
+        my $return_type = $self->get_classes->{$class}->{$method};
+        
 	# (re)load the class if not done yet
 	$self->load_class($class) if $self->get_server->get_load_modules;
 
@@ -411,11 +413,12 @@
 	$self->log (4, "Called method '$method' of object ".
 		       "with oid=$oid");
 
-	# check if objects are returned by this method
-	# and register them in our internal object table
-	# (if not already done yet)
-	my $key;
-	foreach my $rc ( @rc ) {
+        if ( $return_type eq '_object' ) {
+	    # check if objects are returned by this method
+	    # and register them in our internal object table
+	    # (if not already done yet)
+	    my $key;
+	    foreach my $rc ( @rc ) {
 		if ( ref ($rc) and ref ($rc) !~ /ARRAY|HASH|SCALAR/ ) {
 			# returns a single object
 			$self->log (4, "Method returns object: $rc");
@@ -455,7 +458,8 @@
 				}
 			}
 		}
-	}
+	    }
+        }
 
 	# return rc
 	return {

Modified: branches/upstream/libevent-rpc-perl/current/t/06.object2.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libevent-rpc-perl/current/t/06.object2.t?rev=26313&op=diff
==============================================================================
--- branches/upstream/libevent-rpc-perl/current/t/06.object2.t (original)
+++ branches/upstream/libevent-rpc-perl/current/t/06.object2.t Tue Oct 28 21:28:42 2008
@@ -11,7 +11,7 @@
 	plan skip_all => "Neither Event nor Glib installed";
 }
 
-plan tests => 9;
+plan tests => 10;
 
 my $PORT = 27811;
 
@@ -38,7 +38,7 @@
 # create instance of test class over RPC
 my $data = "Some test data. " x 6;
 my $object = Event_RPC_Test->new (
-	data => $data
+    data => $data
 );
 
 # check object
@@ -58,6 +58,10 @@
 # check data of object2
 ok($object2->get_data == $$, "object data is $$");
 
+# check if copying the complete object hash works
+my $ref = $object2->get_object_copy;
+ok($ref->{data} == $$, "object copy data is $$");
+
 # disconnect client
 ok ($client->disconnect, "client disconnected");
 

Modified: branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test2.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test2.pm?rev=26313&op=diff
==============================================================================
--- branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test2.pm (original)
+++ branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test2.pm Tue Oct 28 21:28:42 2008
@@ -14,5 +14,10 @@
     }, $class;
 }
 
+sub get_object_copy {
+    my $self = shift;
+    return $self;
+}
+
 1;
 

Modified: branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test_Server.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test_Server.pm?rev=26313&op=diff
==============================================================================
--- branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test_Server.pm (original)
+++ branches/upstream/libevent-rpc-perl/current/t/Event_RPC_Test_Server.pm Tue Oct 28 21:28:42 2008
@@ -121,6 +121,7 @@
         	  new         	   => '_constructor',
         	  set_data         => 1,
         	  get_data         => 1,
+                  get_object_copy  => 1,
         	},
       },
       connection_hook   => sub {




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