DBIx::Class::StorageReadOnly - Can't insert and update and delete for DBIC
__PACKAGE__->load_components(qw/ StorageReadOnly PK::Auto Core /); # create connection and set readonly info @connection_info = ( 'dbi:mysql:test', 'foo', 'bar', {read_only => 1}, ); my $schema = $schema_class->connect(@connection_info); my $user = $schema->resultset('User')->search({name => 'nomaneko'}); $user->update({name => 'gikoneko'}); # die. Can't update.
If you try to write it in read only DB, the exception is generated.
No bugs have been reported.
Atsushi Kobayashi <atsushi __at__ mobilefactory.jp>
<atsushi __at__ mobilefactory.jp>
Copyright (c) 2006, Atsushi Kobayashi <atsushi __at__ mobilefactory.jp>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install DBIx::Class::StorageReadOnly, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::StorageReadOnly
CPAN shell
perl -MCPAN -e shell install DBIx::Class::StorageReadOnly
For more information on module installation, please visit the detailed CPAN module installation guide.