File Coverage

blib/lib/Catmandu/Plugin/Readonly/Droppable.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Catmandu::Plugin::Readonly::Droppable;
2              
3 1     1   586 use Catmandu::Sane;
  1         2  
  1         10  
4 1     1   9 use Moo::Role;
  1         2  
  1         7  
5              
6             around drop => sub {
7             my ($orig, $self) = @_;
8             my $pkg = ref($self);
9             $self->log->warn("trying to drop a readonly store");
10             my $err = Catmandu::NotImplemented->new("$pkg is readonly");
11             return undef, $err;
12             };
13              
14             1;