remove special case for 'meta' method in col accessor collision checks
Rafael Kitover [Tue, 29 Mar 2011 00:01:05 +0000 (20:01 -0400)]
lib/DBIx/Class/Schema/Loader/Base.pm
t/lib/dbixcsl_common_tests.pm

index 6eaaddc..c298376 100644 (file)
@@ -1660,9 +1660,6 @@ sub _is_result_class_method {
 
         @methods{@methods} = ();
 
-        # futureproof meta
-        $methods{meta} = undef;
-
         $self->_result_class_methods(\%methods);
     }
     my $result_methods = $self->_result_class_methods;
index b610fb5..75e2e61 100644 (file)
@@ -371,8 +371,13 @@ sub test_schema {
     is $class2->column_info('testcomponent_fqn')->{accessor}, undef,
         'accessor for column name that conflicts with a fully qualified component class method removed';
 
-    is $class2->column_info('meta')->{accessor}, undef,
-        'accessor for column name that conflicts with Moose removed';
+    if ($conn->_loader->use_moose) {
+        is $class2->column_info('meta')->{accessor}, undef,
+            'accessor for column name that conflicts with Moose removed';
+    }
+    else {
+        pass "not removing 'meta' accessor with use_moose disabled";
+    }
 
     my %uniq1 = $class1->unique_constraints;
     my $uniq1_test = 0;