NAME

DBIx::Class::StorageReadOnly - Can't insert and update for DBIC

SYNOPSIS

__PACKAGE__->load_components(qw/
    StorageReadOnly
    PK::Auto
    Core
/);

# create connection
my $schema = $schema_class->connect(@connection_info);
# set read only flag.
$schema->{__READ_ONLY_CONNECTION} = 1;

my $user = $schema->resultset('User')->search({name => 'nomaneko'});
$user->update({name => 'gikoneko'}); # die. Can't update.

DESCRIPTION

If you try to write it in read only DB, the exception is generated.

METHOD

insert

set hook point.

update

set hook point.

BUGS AND LIMITATIONS

No bugs have been reported.

AUTHOR

Atsushi Kobayashi <atsushi __at__ mobilefactory.jp>

LICENCE AND COPYRIGHT

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.