Data::Model::Driver::DBI::MasterSlave - master-slave composition for mysql
package MyDB; use base 'Data::Model'; use Data::Model::Schema; use Data::Model::Driver::DBI::MasterSlave; my $dbi_connect_options = {}; my $driver = Data::Model::Driver::DBI::MasterSlave->new( master => { dsn => 'dbi:mysql:host=master.server:database=test', username => 'master', password => 'master', connect_options => $dbi_connect_options, }, slave => { dsn => 'dbi:mysql:host=slave.server:database=test', username => 'slave', password => 'slave', connect_options => $dbi_connect_options, }, ); base_driver $driver; install_model model_name => schema { .... };
It can use with standard master-slave composition.
DBI, Data::Model::Driver::DBI, Data::Model
Kazuhiro Osawa <yappo <at> shibuya <döt> pl>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '<döt>'. Assuming UTF-8
To install Data::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Model
CPAN shell
perl -MCPAN -e shell install Data::Model
For more information on module installation, please visit the detailed CPAN module installation guide.