update my own contrib entry
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / ReadOnly.pm
CommitLineData
c0e7b4e5 1package # hide from PAUSE
2 DBIx::Class::CDBICompat::ReadOnly;
a1373054 3
4use strict;
5use warnings;
6
7sub make_read_only {
8 my $proto = shift;
701da8c4 9 $proto->add_trigger("before_$_" => sub { shift->throw_exception("$proto is read only") })
a1373054 10 foreach qw/create delete update/;
11 return $proto;
12}
13
141;