Channel all DBIHacks methods to the replicated writer
Peter Rabbitson [Sat, 30 Apr 2011 02:08:52 +0000 (04:08 +0200)]
Note this is a workaround to fix an actual reported bug. The whole system
reeks of misdesign, and needs to be revisited at some point.

Changes
lib/DBIx/Class/Storage/DBI/Replicated.pm

diff --git a/Changes b/Changes
index 69b553d..02f436b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -70,6 +70,8 @@ Revision history for DBIx::Class
           with multilevel monikers (e.g. $schema->source('Foo::Bar') )
         - Fix incorrect signature of the default sqlt_deploy_hook - it now
           matches the documentation of passing in the result source object
+        - Fix inadequate handling of internal storage methods within
+          ::Storage::Replicated (RT#66295)
 
     * Misc
         - Rewire all warnings to a new Carp-like implementation internal
index 7f40e27..05b6e19 100644 (file)
@@ -313,19 +313,12 @@ my $method_dispatch = {
     _native_data_type
     _get_dbh
     sql_maker_class
-    _adjust_select_args_for_complex_prefetch
-    _resolve_ident_sources
-    _resolve_column_info
-    _prune_unused_joins
-    _strip_cond_qualifiers
-    _strip_cond_qualifiers_from_array
-    _resolve_aliastypes_from_select_args
     _execute
     _do_query
     _sth
     _dbh_sth
     _dbh_execute
-  /],
+  /, Class::MOP::Class->initialize('DBIx::Class::Storage::DBIHacks')->get_method_list ],
   reader => [qw/
     select
     select_single
@@ -350,10 +343,6 @@ my $method_dispatch = {
     sql_quote_char
     sql_name_sep
 
-    _inner_join_to_node
-    _group_over_selection
-    _extract_order_criteria
-
     _prefetch_autovalues
 
     _max_column_bytesize