[SCM] Debian packaging of MongoDBx-Class CPAN distribution branch, master, updated. debian/1.02-1-2-g2a73f45

Dominique Dumont dod at debian.org
Sun Feb 10 18:40:49 UTC 2013


The following commit has been merged in the master branch:
commit e1536d6548899e0a7a89942d94aaeaf6a99e192e
Author: Dominique Dumont <dod at debian.org>
Date:   Sun Feb 10 19:37:49 2013 +0100

    added patch to fix bug related to AUTOLOAD and inheritance

diff --git a/debian/patches/fix-super-connection b/debian/patches/fix-super-connection
new file mode 100644
index 0000000..34afc49
--- /dev/null
+++ b/debian/patches/fix-super-connection
@@ -0,0 +1,38 @@
+Description: fix weird Moose assert failure 
+ _connection sub tries to call $self->SUPER. But the base class uses
+ AUTOLOAD. AUTOLOAD intercepts the call to _connection from base class and
+ provides the wrong object. Hence this (slightly edited) error message:
+ .
+ Couldn't load application from file "script": Attribute (_connection)
+ does not pass the type constraint because: Validation failed for
+ 'MongoDB::Connection' with value MongoDBx::Class::Collection{
+ _database: MongoDBx::Class::Database{ _connection:
+ MongoDBx::Class::Connection=HASH(0x3f80c38), name: "admin" }, name:
+ "SUPER" } at constructor MongoDBx::Class::Cursor::new (defined at
+ .../lib/MongoDBx/Class/Cursor.pm line 145) line 34
+ .
+ This patch thwarts AUTOLOAD by spelling out the method to call in the base
+ class.
+Author: dod
+--- a/lib/MongoDBx/Class/Cursor.pm
++++ b/lib/MongoDBx/Class/Cursor.pm
+@@ -85,7 +85,7 @@
+ };
+ 
+ sub _connection {
+-	version->parse($MongoDB::VERSION) < v0.502.0 ? $_[0]->SUPER : $_[0]->_client;
++	version->parse($MongoDB::VERSION) < v0.502.0 ? $_[0]->SUPER::_connection : $_[0]->_client;
+ }
+ 
+ =head1 AUTHOR
+--- a/lib/MongoDBx/Class/Database.pm
++++ b/lib/MongoDBx/Class/Database.pm
+@@ -50,7 +50,7 @@
+ };
+ 
+ sub _connection {
+-	version->parse($MongoDB::VERSION) < v0.502.0 ? $_[0]->SUPER : $_[0]->_client;
++	version->parse($MongoDB::VERSION) < v0.502.0 ? $_[0]->SUPER::_connection : $_[0]->_client;
+ }
+ 
+ =head1 AUTHOR
diff --git a/debian/patches/series b/debian/patches/series
index 15db257..429f02c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 fix-spelling
 fix-cursor-expand-bug
 fix-pod-typo
+fix-super-connection

-- 
Debian packaging of MongoDBx-Class CPAN distribution



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