From: Rafael Kitover Date: Wed, 28 Apr 2010 09:20:08 +0000 (+0000) Subject: update ::DBI::Replicated X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e471ab87e76b9965174b13c6b1f37025ba2615b9;p=dbsrgits%2FDBIx-Class-Historic.git update ::DBI::Replicated --- diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 20a8d73..51bd137 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -343,7 +343,6 @@ has 'write_handler' => ( _dbh_commit _execute_array _placeholders_supported - _verify_pid savepoints _sqlt_minimum_version _sql_maker_opts @@ -371,6 +370,16 @@ has 'write_handler' => ( /], ); +my @unimplemented = qw( + _arm_global_destructor + _preserve_foreign_dbh +); + +for my $method (@unimplemented) { + __PACKAGE__->meta->add_method($method, sub { + croak "$method must not be called on ".(blessed shift).' objects'; + }); +} has _master_connect_info_opts => (is => 'rw', isa => HashRef, default => sub { {} }); @@ -1040,6 +1049,22 @@ sub _get_server_version { return $self->_server_info->{dbms_version}; } +sub _verify_pid { + my $self = shift; + + for my $storage ($self->all_storages) { + $storage->_verify_pid; + } +} + +sub _verify_tid { + my $self = shift; + + for my $storage ($self->all_storages) { + $storage->_verify_tid; + } +} + =head1 GOTCHAS Due to the fact that replicants can lag behind a master, you must take care to