debian/0000755000000000000000000000000012173277116007175 5ustar debian/copyright0000644000000000000000000000204612173277116011132 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: MongoDBx-Class Upstream-Contact: Ido Perlmuter Source: https://metacpan.org/release/MongoDBx-Class/ Files: * Copyright: 2010-2013, Ido Perlmuter License: Artistic or GPL-1+ Files: debian/* Copyright: 2012-2013, Dominique Dumont License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/watch0000644000000000000000000000017212173277116010226 0ustar version=3 https://metacpan.org/release/MongoDBx-Class/ .*/MongoDBx-Class-v?(\d[\d.-]*)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/changelog0000644000000000000000000000236512173277116011055 0ustar libmongodbx-class-perl (1.02-3) unstable; urgency=low * control: depends on libmodule-pluggable-perl (Closes: #711668) -- Dominique Dumont Mon, 22 Jul 2013 20:47:29 +0200 libmongodbx-class-perl (1.02-2) unstable; urgency=low * added patch to fix bug related to AUTOLOAD and inheritance -- Dominique Dumont Sun, 10 Feb 2013 19:38:04 +0100 libmongodbx-class-perl (1.02-1) unstable; urgency=low [ Salvatore Bonaccorso ] * Change Vcs-Git to canonical URI (git://anonscm.debian.org) * Change search.cpan.org based URIs to metacpan.org based URIs [ Dominique Dumont ] * new upstream release * copyright: updated (c) years -- Dominique Dumont Sun, 10 Feb 2013 09:44:36 +0100 libmongodbx-class-perl (1.01-1) unstable; urgency=low * Team upload. * New upstream release. * Don't install README anymore (text version of the POD). * Update years of upstream copyright. * Bump Standards-Version to 3.9.4 (no changes). * Update short description. -- gregor herrmann Sat, 15 Dec 2012 22:10:44 +0100 libmongodbx-class-perl (1.0-1) unstable; urgency=low * Initial Release. (Closes: #690451) -- Dominique Dumont Sun, 14 Oct 2012 15:47:01 +0200 debian/compat0000644000000000000000000000000212173277116010373 0ustar 8 debian/patches/0000755000000000000000000000000012173277116010624 5ustar debian/patches/series0000644000000000000000000000010512173277116012035 0ustar fix-spelling fix-cursor-expand-bug fix-pod-typo fix-super-connection debian/patches/fix-super-connection0000644000000000000000000000261312173277116014630 0ustar 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 debian/patches/fix-cursor-expand-bug0000644000000000000000000000045712173277116014706 0ustar Description: Fix cursor expand bug Author: dod --- a/lib/MongoDBx/Class/Cursor.pm +++ b/lib/MongoDBx/Class/Cursor.pm @@ -56,7 +56,7 @@ =cut around 'next' => sub { - my ($orig, $self, $do_not_expand) = (shift, shift); + my ($orig, $self, $do_not_expand) = @_; my $doc = $self->$orig || return; debian/patches/fix-pod-typo0000644000000000000000000000055612173277116013114 0ustar Description: Fix pod typo Author: dod --- a/lib/MongoDBx/Class/Cursor.pm +++ b/lib/MongoDBx/Class/Cursor.pm @@ -43,7 +43,7 @@ =head1 OBJECT METHODS -Aside from methods provided by L, the following method +Aside from methods provided by L, the following method modifications are performed: =head2 next( [ $do_not_expand ] ) debian/patches/fix-spelling0000644000000000000000000000372612173277116013160 0ustar Description: Fix spelling in pod doc Author: dod --- a/lib/MongoDBx/Class.pm +++ b/lib/MongoDBx/Class.pm @@ -195,7 +195,7 @@ =over -=item * MongoDBx::Class's flexibility is dependant on its ability to recognize +=item * MongoDBx::Class's flexibility is dependent on its ability to recognize which class a document in a MongoDB collection expands to. Currently, MongoDBx::Class requires every document to have an attribute called "_class" that contains the name of the document class to use. This isn't very --- a/lib/MongoDBx/Class/ConnectionPool.pm +++ b/lib/MongoDBx/Class/ConnectionPool.pm @@ -51,7 +51,7 @@ number of connections as a setting. Give connections from the pool on a per-request basis. The pool is empty at first, and connections are created for each request, until the maximum is reached. The behaviour of the pool when this -maximum is reached is dependant on the implementation. There are currently +maximum is reached is dependent on the implementation. There are currently two implementations: =over --- a/lib/MongoDBx/Class/Document.pm +++ b/lib/MongoDBx/Class/Document.pm @@ -125,7 +125,7 @@ =head2 update( [ \%object, [ \%options ] ] ) Saves a new version of the document to the database. The behavior of this -method is dependant on the existance or non-existance of an object hash-ref: +method is dependent on the existance or non-existance of an object hash-ref: If an object hash-ref is provided, all of its key-value pairs are collapsed, and a C<$set> update is performed on them. For example: @@ -200,7 +200,7 @@ Both methods are equivalent. They are shortcut methods for invoking the collection's C method on this document only. So, umm, they remove the document. But note that this operation does not cascade, so documents -which are considered dependant on this document (such as those that reference +which are considered dependent on this document (such as those that reference it with C) will not be removed too. =cut debian/source/0000755000000000000000000000000012173277116010475 5ustar debian/source/format0000644000000000000000000000001412173277116011703 0ustar 3.0 (quilt) debian/control0000644000000000000000000000403112173277116010576 0ustar Source: libmongodbx-class-perl Maintainer: Debian Perl Group Uploaders: Dominique Dumont Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: libdatetime-format-w3cdtf-perl, libdatetime-perl, libmongodb-perl, libmoose-perl, libnamespace-autoclean-perl, libtry-tiny-perl, perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libmongodbx-class-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libmongodbx-class-perl.git Homepage: https://metacpan.org/release/MongoDBx-Class/ Package: libmongodbx-class-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libdatetime-format-w3cdtf-perl, libmodule-pluggable-perl | perl (<< 5.17.0), libmongodb-perl, libmoose-perl, libnamespace-autoclean-perl, libtry-tiny-perl Description: flexible ORM module for MongoDB databases MongoDBx::Class Perl module is a flexible object relational mapper (ORM) for MongoDB databases. Given a schema-like collection of document classes, MongoDBx::Class expands MongoDB objects (hash-refs in Perl) from the database into objects of those document classes, and collapses such objects back to the database. . MongoDBx::Class takes advantage of the fact that Perl's MongoDB driver is Moose-based to extend and tweak the driver's behavior, instead of wrapping it. This means MongoDBx::Class does not define its own syntax, so you simply use it exactly as you would the MongoDB driver directly. That said, MongoDBx::Class adds some sugar that enhances and simplifies the syntax unobtrusively (either use it or don't). Thus, it is relatively easy to convert your current MongoDB applications to MongoDBx::Class. A collection in MongoDBx::Class isa('MongoDB::Collection'), a database in MongoDBx::Class isa('MongoDB::Database'), etc. debian/rules0000755000000000000000000000003612173277116010254 0ustar #!/usr/bin/make -f %: dh $@