r66132 - in /branches/upstream/librose-db-object-perl/current: Changes META.yml lib/Rose/DB/Object.pm lib/Rose/DB/Object/ConventionManager.pm lib/Rose/DB/Object/Metadata/MethodMaker.pm t/db-object-manager-bulk-ops.t t/db-object.t
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Wed Dec 22 20:30:14 UTC 2010
Author: periapt-guest
Date: Wed Dec 22 20:30:03 2010
New Revision: 66132
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=66132
Log:
[svn-upgrade] new version librose-db-object-perl (0.793)
Modified:
branches/upstream/librose-db-object-perl/current/Changes
branches/upstream/librose-db-object-perl/current/META.yml
branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object.pm
branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/ConventionManager.pm
branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/Metadata/MethodMaker.pm
branches/upstream/librose-db-object-perl/current/t/db-object-manager-bulk-ops.t
branches/upstream/librose-db-object-perl/current/t/db-object.t
Modified: branches/upstream/librose-db-object-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-object-perl/current/Changes?rev=66132&op=diff
==============================================================================
--- branches/upstream/librose-db-object-perl/current/Changes (original)
+++ branches/upstream/librose-db-object-perl/current/Changes Wed Dec 22 20:30:03 2010
@@ -1,3 +1,13 @@
+0.793 (12.21.2010) - John Siracusa <siracusa at gmail.com>
+
+ * Corrected skip count in t/db-object.t
+
+0.792 (12.20.2010) - John Siracusa <siracusa at gmail.com>
+
+ * Detect attempts to create methods whose names conflict with
+ methods defined in Rose::DB::Object itself. (Reported by
+ Dave Howorth)
+
0.791 (10.23.2010) - John Siracusa <siracusa at gmail.com>
* Fixed a bug that caused on_save column triggers to fire when loading.
Modified: branches/upstream/librose-db-object-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-object-perl/current/META.yml?rev=66132&op=diff
==============================================================================
--- branches/upstream/librose-db-object-perl/current/META.yml (original)
+++ branches/upstream/librose-db-object-perl/current/META.yml Wed Dec 22 20:30:03 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Rose-DB-Object
-version: 0.791
+version: 0.793
abstract: Extensible, high performance object-relational mapper (ORM).
author:
- John Siracusa <siracusa at gmail.com>
Modified: branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object.pm?rev=66132&op=diff
==============================================================================
--- branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object.pm (original)
+++ branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object.pm Wed Dec 22 20:30:03 2010
@@ -16,7 +16,7 @@
use Rose::DB::Object::Exception;
use Rose::DB::Object::Util();
-our $VERSION = '0.791';
+our $VERSION = '0.793';
our $Debug = 0;
@@ -2490,7 +2490,7 @@
=head1 CONTRIBUTORS
-Bradley C Bailey, Graham Barr, Kostas Chatzikokolakis, David Christensen, Lucian Dragus, Justin Ellison, Perrin Harkins, Cees Hek, Benjamin Hitz, Peter Karman, Ed Loehr, Adam Mackler, Michael Reece, Thomas Whaples, Douglas Wilson, Teodor Zlatanov
+Bradley C Bailey, Graham Barr, Kostas Chatzikokolakis, David Christensen, Lucian Dragus, Justin Ellison, Perrin Harkins, Cees Hek, Benjamin Hitz, Dave Howorth, Peter Karman, Ed Loehr, Adam Mackler, Michael Reece, Thomas Whaples, Douglas Wilson, Teodor Zlatanov
=head1 AUTHOR
Modified: branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/ConventionManager.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/ConventionManager.pm?rev=66132&op=diff
==============================================================================
--- branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/ConventionManager.pm (original)
+++ branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/ConventionManager.pm Wed Dec 22 20:30:03 2010
@@ -237,6 +237,8 @@
sub method_name_conflicts
{
my($self, $name) = @_;
+
+ return 1 if(Rose::DB::Object->can($name));
my $meta = $self->meta;
Modified: branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/Metadata/MethodMaker.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/Metadata/MethodMaker.pm?rev=66132&op=diff
==============================================================================
--- branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/Metadata/MethodMaker.pm (original)
+++ branches/upstream/librose-db-object-perl/current/lib/Rose/DB/Object/Metadata/MethodMaker.pm Wed Dec 22 20:30:03 2010
@@ -415,6 +415,13 @@
my $method_name = $self->method_name($type)
or Carp::croak "No method name defined for method type '$type'";
+ if(Rose::DB::Object->can($method_name))
+ {
+ Carp::croak "Cannot create method '$method_name' in class ",
+ "$options->{'target_class'} - Rose::DB::Object defines a ",
+ "method with the same name";
+ }
+
$method_maker_class->make_methods(
$options,
$method_maker_type =>
Modified: branches/upstream/librose-db-object-perl/current/t/db-object-manager-bulk-ops.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-object-perl/current/t/db-object-manager-bulk-ops.t?rev=66132&op=diff
==============================================================================
--- branches/upstream/librose-db-object-perl/current/t/db-object-manager-bulk-ops.t (original)
+++ branches/upstream/librose-db-object-perl/current/t/db-object-manager-bulk-ops.t Wed Dec 22 20:30:03 2010
@@ -741,7 +741,8 @@
where =>
[
name => { like => 'NoneSuch%' },
- started => { gt => [ $now, $yesterday, '1/1/2005' ] }
+ started => { gt => [ $now, $yesterday, '1/1/2005' ] },
+ [ \q(rose_db_object_test.num % 2 == ?) => 0 ],
]);
ok(defined $num, "update 1 - $db_type");
@@ -776,6 +777,7 @@
started => { lt => $yesterday },
started => { lt => '1/1/2005' },
],
+ [ \q(rose_db_object_test.num % 2 != ?) => 0 ],
]);
ok($num, "update 4 - $db_type");
Modified: branches/upstream/librose-db-object-perl/current/t/db-object.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-object-perl/current/t/db-object.t?rev=66132&op=diff
==============================================================================
--- branches/upstream/librose-db-object-perl/current/t/db-object.t (original)
+++ branches/upstream/librose-db-object-perl/current/t/db-object.t Wed Dec 22 20:30:03 2010
@@ -2,7 +2,7 @@
use strict;
-use Test::More tests => 597;
+use Test::More tests => 598;
BEGIN
{
@@ -1068,7 +1068,7 @@
SKIP: foreach my $db_type ('sqlite')
{
- skip("SQLite tests", 74) unless($HAVE_SQLITE);
+ skip("SQLite tests", 75) unless($HAVE_SQLITE);
Rose::DB->default_type($db_type);
@@ -2108,6 +2108,49 @@
{
our $HAVE_SQLITE = 1;
+ #
+ # Method name conflict tests
+ #
+
+ local $@;
+
+ eval
+ {
+ package MyNameConflictB;
+
+ our @ISA = qw(Rose::DB::Object);
+
+ sub init_db { Rose::DB->new('sqlite') }
+
+ __PACKAGE__->meta->setup
+ (
+ table => 'foob',
+ columns => [ qw(id blee) ],
+ );
+
+ package MyNameConflictA;
+
+ our @ISA = qw(Rose::DB::Object);
+
+ sub init_db { Rose::DB->new('sqlite') }
+
+ __PACKAGE__->meta->setup
+ (
+ table => 'fooa',
+ columns => [ qw(bar baz) ],
+ foreign_keys =>
+ [
+ new =>
+ {
+ class => 'MyNameConflictB',
+ key_columns => { baz => 'id' },
+ },
+ ],
+ );
+ };
+
+ like($@, qr/Rose::DB::Object defines a method with the same name/, 'method name conflict');
+
# Drop existing table and create schema, ignoring errors
{
local $dbh->{'RaiseError'} = 0;
More information about the Pkg-perl-cvs-commits
mailing list