Maker/Source/File.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 30 CC 3 SCAR 14.6
CC
3
Cov
0%
freshness
6.0
make
6.0
exists
2.0
CRAP 4.3
1 package Document::Maker::Source::File;
2  
3 use Moose;
4  
5 with qw/Document::Maker::Role::Component Document::Maker::Role::Dependency/;
6  
7 has file => qw/is ro required 1 isa Path::Class::File coerce 1/;
8  
9 sub exists {
10 my $self = shift;
11 return -e $self->file;
12 }
13  
14 sub freshness {
15 my $self = shift;
16 return 0 unless -e $self->file;
17 return $self->file->stat->mtime;
18 }
19  
20 sub fresh {
21 my $self = shift;
22 return $self->exists;
23 }
24  
25 sub make {
26 my $self = shift;
27 $self->log->debug("Don't know how to make: ", $self->file) and return 0 unless $self->maker->make($self->file);
28 }
29  
30 1;