Diff of /branches/0.71/lib/SOAP/Lite.pm [r411] .. [r412]  Maximize  Restore

Switch to side-by-side view

--- a/branches/0.71/lib/SOAP/Lite.pm
+++ b/branches/0.71/lib/SOAP/Lite.pm
@@ -4,7 +4,7 @@
 # SOAP::Lite is free software; you can redistribute it
 # and/or modify it under the same terms as Perl itself.
 #
-# $Id: Lite.pm 407 2012-06-23 20:17:58Z kutterma $
+# $Id: Lite.pm 412 2012-07-01 16:49:06Z kutterma $
 #
 # ======================================================================
 
@@ -1085,7 +1085,7 @@
     my $self = shift;
     return if $self->multirefinplace();
 
-    my $seen = $self->seen();
+    my $seen = $self->{ _seen };
     map { $_->[1]->{_id} = 1; $_ }
         map { $self->encode_object($seen->{$_}->{value}) }
             grep { $seen->{$_}->{multiref} && !$seen->{$_}->{recursive} }
@@ -1122,8 +1122,14 @@
 
     use vars '%objectstack';           # we'll play with symbol table
     local %objectstack = %objectstack; # want to see objects ONLY in the current tree
+
     # did we see this object in current tree? Seems to be recursive refs
-    $self->recursive_object($object) if ++$objectstack{$id} > 1;
+	# same as call to $self->recursive_object($object) - but
+	# recursive_object($object) has to re-compute the object's id
+    if (++$objectstack{ $id } > 1) {
+		$self->{ _seen }->{ $id }->{recursive} = 1
+	}
+
     # return if we already saw it twice. It should be already properly serialized
     return if $objectstack{$id} > 2;
 

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks