line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
13
|
|
|
13
|
|
1816761
|
use 5.010; # re::regexp_pattern |
|
13
|
|
|
|
|
53
|
|
|
13
|
|
|
|
|
532
|
|
2
|
13
|
|
|
13
|
|
76
|
use strict; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
466
|
|
3
|
13
|
|
|
13
|
|
65
|
use warnings; |
|
13
|
|
|
|
|
51
|
|
|
13
|
|
|
|
|
709
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package IO::All::Rule; |
6
|
|
|
|
|
|
|
# ABSTRACT: Iterative, recursive file finder with IO::All |
7
|
|
|
|
|
|
|
our $VERSION = '0.003'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
13
|
|
|
13
|
|
16799
|
use Path::Iterator::Rule 0.002; |
|
13
|
|
|
|
|
220129
|
|
|
13
|
|
|
|
|
758
|
|
10
|
|
|
|
|
|
|
our @ISA = qw/Path::Iterator::Rule/; |
11
|
|
|
|
|
|
|
|
12
|
13
|
|
|
13
|
|
14627
|
use IO::All; |
|
13
|
|
|
|
|
173578
|
|
|
13
|
|
|
|
|
162
|
|
13
|
13
|
|
|
13
|
|
13636
|
use namespace::clean; |
|
13
|
|
|
|
|
243053
|
|
|
13
|
|
|
|
|
98
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _objectify { |
16
|
41
|
|
|
41
|
|
350344
|
my ( $self, $path ) = @_; |
17
|
41
|
|
|
|
|
248
|
return io($path); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _children { |
21
|
122
|
|
|
122
|
|
215315
|
my $self = shift; |
22
|
122
|
|
|
|
|
189
|
my $path = shift; |
23
|
|
|
|
|
|
|
# IO::All can't seem to give symlink-path relative children, so |
24
|
|
|
|
|
|
|
# we construct the list by hand |
25
|
122
|
|
|
|
|
588
|
opendir( my $dir, "$path" ); |
26
|
122
|
100
|
|
|
|
7912
|
return map { [ $_, io("$path/$_") ] } grep { $_ ne "." && $_ ne ".." } readdir $dir; |
|
232
|
|
|
|
|
26828
|
|
|
476
|
|
|
|
|
2086
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# vim: ts=4 sts=4 sw=4 et: |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |