File Coverage

blib/lib/Storage/Abstract/Role/Driver/Basic.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 17 17 100.0


line stmt bran cond sub pod time code
1             package Storage::Abstract::Role::Driver::Basic;
2             $Storage::Abstract::Role::Driver::Basic::VERSION = '0.008';
3 11     11   8058 use v5.14;
  11         44  
4 11     11   63 use warnings;
  11         19  
  11         835  
5              
6 11     11   61 use Mooish::Base -standard, -role;
  11         23  
  11         97  
7              
8 11     11   155459 use Storage::Abstract::Handle;
  11         24  
  11         2469  
9              
10             sub _build_readonly
11             {
12 8     8   281 return !!0;
13             }
14              
15             before 'store_impl' => sub {
16             $_[2] = Storage::Abstract::Handle->adapt($_[2]);
17             };
18              
19             before 'retrieve_impl' => sub {
20             Storage::Abstract::X::NotFound->raise('file was not found')
21             unless $_[0]->is_stored_impl($_[1]);
22             };
23              
24             before 'dispose_impl' => sub {
25             my $self = shift;
26              
27             Storage::Abstract::X::NotFound->raise('file was not found')
28             unless $self->is_stored_impl(@_);
29             };
30              
31             1;
32