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   14638 use Moo;
  12         14965  
  12         75  
6 12     12   5561 use MooX::late;
  12         19537  
  12         194  
7 12     12   1631 use namespace::autoclean;
  12         9767  
  12         114  
8              
9             our $VERSION = '1.21';
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 29 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__