[Bast-commits] r7839 -
DBIx-Class/0.08/branches/handle_all_storage_methods_in_replicated/t/storage
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Mon Nov 2 14:26:00 GMT 2009
Author: caelum
Date: 2009-11-02 14:26:00 +0000 (Mon, 02 Nov 2009)
New Revision: 7839
Modified:
DBIx-Class/0.08/branches/handle_all_storage_methods_in_replicated/t/storage/replication.t
Log:
minor test code cleanup
Modified: DBIx-Class/0.08/branches/handle_all_storage_methods_in_replicated/t/storage/replication.t
===================================================================
--- DBIx-Class/0.08/branches/handle_all_storage_methods_in_replicated/t/storage/replication.t 2009-11-02 11:55:34 UTC (rev 7838)
+++ DBIx-Class/0.08/branches/handle_all_storage_methods_in_replicated/t/storage/replication.t 2009-11-02 14:26:00 UTC (rev 7839)
@@ -268,23 +268,23 @@
### check that all Storage::DBI methods are handled by ::Replicated
{
- my $storage_dbi_meta = Class::MOP::Class->initialize('DBIx::Class::Storage::DBI');
- my $replicated_meta = DBIx::Class::Storage::DBI::Replicated->meta;
+ my @storage_dbi_methods = Class::MOP::Class
+ ->initialize('DBIx::Class::Storage::DBI')->get_all_method_names;
- my @storage_dbi_methods = sort $storage_dbi_meta->get_all_method_names;
- my @replicated_methods = sort $replicated_meta->get_all_method_names;
+ my @replicated_methods = DBIx::Class::Storage::DBI::Replicated->meta
+ ->get_all_method_names;
-# remove constants
+# remove constants and OTHER_CRAP
@storage_dbi_methods = grep !/^[A-Z_]+\z/, @storage_dbi_methods;
# remove CAG accessors
@storage_dbi_methods = grep !/_accessor\z/, @storage_dbi_methods;
# remove DBIx::Class (the root parent, with CAG and stuff) methods
- my @cag_methods = Class::MOP::Class->initialize('DBIx::Class')
+ my @root_methods = Class::MOP::Class->initialize('DBIx::Class')
->get_all_method_names;
my %count;
- $count{$_}++ for (@storage_dbi_methods, @cag_methods);
+ $count{$_}++ for (@storage_dbi_methods, @root_methods);
@storage_dbi_methods = grep $count{$_} != 2, @storage_dbi_methods;
More information about the Bast-commits
mailing list