File: Searchable.pm

package info (click to toggle)
libcatmandu-perl 1.2024-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,552 kB
  • sloc: perl: 17,037; makefile: 24; sh: 1
file content (14 lines) | stat: -rw-r--r-- 329 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package Catmandu::Plugin::Readonly::Searchable;

use Catmandu::Sane;
use Moo::Role;

around delete_by_query => sub {
    my ($orig, $self) = @_;
    my $pkg = ref($self);
    $self->log->warn("trying to delete from readonly store");
    my $err = Catmandu::NotImplemented->new("$pkg is readonly");
    return undef, $err;
};

1;