blib/lib/File/Find/Age.pm

filter: Statementstmt 70.0% 14 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 67.8% 19 / 28 CC 2 SCAR 9.8
CC
2
Cov
64%
in
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
↑ Summary
1 package File::Find::Age;
2  
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use File::Find::Rule;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our $VERSION = '0.01';
10  
11 0 ▶sub in {
Subroutine in: not called CC=2 SCAR=17.9
Pod documented
12 0 my $class = shift;
13 my @paths =
14 0 ▶ map { ref $_ eq 'ARRAY' ? File::Spec->catdir(@$_) : $_ }
Branch: 1 branch
BranchTrueFalseTotal
ref $_ eq 'ARRAY' ? : 0 0 0
15 @_;
16  
17 return [
18 0 sort { $a->{mtime} <=> $b->{mtime} }
19 0 map { +{ mtime => (stat($_))[9], file => $_ } } # 9 => mtime
20 File::Find::Rule->file->in(@paths)
21 ];
22 }
23  
24 1 1;
25  
26  
27 __END__
↑ Summary