r12216 - in /branches/upstream/libdata-visitor-perl/current: Changes META.yml SIGNATURE lib/Data/Visitor.pm lib/Data/Visitor/Callback.pm t/callback.t

ghostbar-guest at users.alioth.debian.org ghostbar-guest at users.alioth.debian.org
Tue Jan 8 14:58:03 UTC 2008


Author: ghostbar-guest
Date: Tue Jan  8 14:58:03 2008
New Revision: 12216

URL: http://svn.debian.org/wsvn/?sc=1&rev=12216
Log:
[svn-upgrade] Integrating new upstream version, libdata-visitor-perl (0.12)

Modified:
    branches/upstream/libdata-visitor-perl/current/Changes
    branches/upstream/libdata-visitor-perl/current/META.yml
    branches/upstream/libdata-visitor-perl/current/SIGNATURE
    branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor.pm
    branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor/Callback.pm
    branches/upstream/libdata-visitor-perl/current/t/callback.t

Modified: branches/upstream/libdata-visitor-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-visitor-perl/current/Changes?rev=12216&op=diff
==============================================================================
--- branches/upstream/libdata-visitor-perl/current/Changes (original)
+++ branches/upstream/libdata-visitor-perl/current/Changes Tue Jan  8 14:58:03 2008
@@ -1,3 +1,10 @@
+0.12
+	- _register_mapping was not called for each class callback result
+
+0.11
+	- Fix a bug where objects were mapped to undef when a class callback
+	  doesn't match
+
 0.10
 	- Fix buggy behavior for duplicate and circular values
 

Modified: branches/upstream/libdata-visitor-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-visitor-perl/current/META.yml?rev=12216&op=diff
==============================================================================
--- branches/upstream/libdata-visitor-perl/current/META.yml (original)
+++ branches/upstream/libdata-visitor-perl/current/META.yml Tue Jan  8 14:58:03 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Data-Visitor
-version:             0.10
+version:             0.12
 abstract:            ~
 license:             ~
 author:              ~

Modified: branches/upstream/libdata-visitor-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-visitor-perl/current/SIGNATURE?rev=12216&op=diff
==============================================================================
--- branches/upstream/libdata-visitor-perl/current/SIGNATURE (original)
+++ branches/upstream/libdata-visitor-perl/current/SIGNATURE Tue Jan  8 14:58:03 2008
@@ -14,23 +14,23 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 6e15db1a3fad01606944096ed44e105bcaef19ee Changes
+SHA1 c1e09f5d4abd0ebd5d974e7685413c7ec7cd3469 Changes
 SHA1 adbdb1d57cfa058d1ced16b5767527d0dfb6a253 MANIFEST
 SHA1 ddb918d4e02cc06f4b9fe77adeca65403f8fdd56 MANIFEST.SKIP
-SHA1 158b2d3c82db5e835e55737229c66f2327305472 META.yml
+SHA1 2bb039af3c3549d34d99550130893f00f375440e META.yml
 SHA1 7e820fe45a90871dcc686bd3ffd7897444a6ea30 Makefile.PL
-SHA1 e269b1fe9f66e3f8d5e62c4ece40d6d16025b4da lib/Data/Visitor.pm
-SHA1 dc8f7e873d72f84892fac84ad6205f95f6b50363 lib/Data/Visitor/Callback.pm
+SHA1 5004053a3513228302b5d5e32d62bbb01f80f7fb lib/Data/Visitor.pm
+SHA1 b47da60abe8faea57006f9a6306d7eee213a953c lib/Data/Visitor/Callback.pm
 SHA1 dfba09a3df7adaf6d0369a4745e6e336272c405d t/base.t
 SHA1 257c858e1bc12c1039e93cac62a0d37f2e0d804d t/bugs.t
-SHA1 74100f842ec1699a35958a59c39d434a84dfc501 t/callback.t
+SHA1 e4b813021fa680c61cb4229a9ddeb0a22ec5bf82 t/callback.t
 SHA1 3836b0eeb006cc4984e80dec1a537b808c3173d2 t/callback_aliasing.t
 SHA1 8498703c0e3e9f3265237d5288bec4c33ed3b3f6 t/circular_refs.t
 SHA1 54affd2088fa25d8eec562fb8d39e1abd0d123c7 t/globs.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (Darwin)
 
-iD8DBQFHcSElVCwRwOvSdBgRAtFYAJ0SZy0xZuOjbhD4iM5ENFUy9dPPywCeJL3y
-7me5pt32qGq9S7HI64GLJB0=
-=0wL1
+iD8DBQFHgu3XVCwRwOvSdBgRAky1AJ9mSwUDBFNFHJXfXGEtI0SQk/kXqgCfcEwM
+hUhkzrwTAhAOaac/icA5DjY=
+=vx/H
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor.pm?rev=12216&op=diff
==============================================================================
--- branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor.pm (original)
+++ branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor.pm Tue Jan  8 14:58:03 2008
@@ -10,7 +10,7 @@
 use overload ();
 use Symbol ();
 
-our $VERSION = "0.10";
+our $VERSION = "0.12";
 
 sub visit {
 	my ( $self, $data ) = @_;
@@ -325,7 +325,7 @@
 
 =head1 COPYRIGHT & LICENSE
 
-	Copyright (c) 2006 Yuval Kogman. All rights reserved
+	Copyright (c) 2006-2008 Yuval Kogman. All rights reserved
 	This program is free software; you can redistribute
 	it and/or modify it under the same terms as Perl itself.
 

Modified: branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor/Callback.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor/Callback.pm?rev=12216&op=diff
==============================================================================
--- branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor/Callback.pm (original)
+++ branches/upstream/libdata-visitor-perl/current/lib/Data/Visitor/Callback.pm Tue Jan  8 14:58:03 2008
@@ -58,13 +58,20 @@
 	my $ignore = $self->ignore_return_values;
 
 	my $new_data = $self->callback( object => $data );
-	$self->_register_mapping( $data, $new_data );
-	$data = $new_data unless $ignore;
+	unless ( $ignore ) {
+		$self->_register_mapping( $data, $new_data );
+		$data = $new_data;
+	}
 
 	foreach my $class ( @{ $self->class_callbacks } ) {
 		last unless blessed($data);
-		my $new_data = $self->callback( $class => $data ) if $data->isa($class);
-		$data = $new_data unless $ignore;
+		next unless $data->isa($class);
+
+		my $new_data = $self->callback( $class => $data );
+		unless ( $ignore ) {
+			$self->_register_mapping( $data, $new_data );
+			$data = $new_data;
+		}
 	}
 
 	$data;

Modified: branches/upstream/libdata-visitor-perl/current/t/callback.t
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-visitor-perl/current/t/callback.t?rev=12216&op=diff
==============================================================================
--- branches/upstream/libdata-visitor-perl/current/t/callback.t (original)
+++ branches/upstream/libdata-visitor-perl/current/t/callback.t Tue Jan  8 14:58:03 2008
@@ -27,6 +27,7 @@
 		scalar
 		Moose
 		Mammal
+		Unrelated::Class
 	),
 );
 
@@ -65,6 +66,9 @@
 	package Mammal;
 	package Moose;
 	our @ISA = ("Mammal");
+}
+{
+	package Unrelated::Class;
 }
 
 counters_are( bless({}, "Moose"), "object", {




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