File Coverage

blib/lib/AnyEvent/Filesys/Notify/Event.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 6 66.6
pod 3 3 100.0
total 17 21 80.9


line stmt bran cond sub pod time code
1             package AnyEvent::Filesys::Notify::Event;
2              
3             # ABSTRACT: Object to report changes in the monitored filesystem
4              
5 12     12   12861 use Moo;
  12         8651  
  12         50  
6 12     12   3900 use MooX::late;
  12         14816  
  12         148  
7 12     12   1356 use namespace::autoclean;
  12         9273  
  12         58  
8              
9             our $VERSION = '1.20';
10              
11             has path => ( is => 'ro', isa => 'Str', required => 1 );
12             has type => ( is => 'ro', isa => 'Str', required => 1 );
13             has is_dir => ( is => 'ro', isa => 'Bool', default => 0 );
14              
15             sub is_created {
16 5     5 1 28 return shift->type eq 'created';
17             }
18             sub is_modified {
19 0     0 1   return shift->type eq 'modified';
20             }
21             sub is_deleted {
22 0     0 1   return shift->type eq 'deleted';
23             }
24              
25             1;
26              
27             __END__