From: Rafael Kitover Date: Mon, 2 Nov 2009 14:26:00 +0000 (+0000) Subject: minor test code cleanup X-Git-Tag: v0.08119~23^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b75235fe460933adf4e637e6ef4c0bea5cb57aae;p=dbsrgits%2FDBIx-Class.git minor test code cleanup --- diff --git a/t/storage/replication.t b/t/storage/replication.t index 985e813..5b74ab9 100644 --- a/t/storage/replication.t +++ b/t/storage/replication.t @@ -268,23 +268,23 @@ for my $method (qw/by_connect_info by_storage_type/) { ### 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;