File Coverage

blib/lib/DBIx/Class/CDBICompat/ReadOnly.pm
Criterion Covered Total %
statement 6 10 60.0
branch n/a
condition n/a
subroutine 2 4 50.0
pod 0 1 0.0
total 8 15 53.3


line stmt bran cond sub pod time code
1             package # hide from PAUSE
2             DBIx::Class::CDBICompat::ReadOnly;
3              
4 2     2   1216 use strict;
  2         3  
  2         60  
5 2     2   10 use warnings;
  2         3  
  2         216  
6              
7             sub make_read_only {
8 0     0 0   my $proto = shift;
9 0     0     $proto->add_trigger("before_$_" => sub { shift->throw_exception("$proto is read only") })
10 0           foreach qw/create delete update/;
11 0           return $proto;
12             }
13              
14             1;