line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Directory::Scanner; |
2
|
|
|
|
|
|
|
# ABSTRACT: Streaming directory scanner |
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
507231
|
use strict; |
|
9
|
|
|
|
|
77
|
|
|
9
|
|
|
|
|
195
|
|
5
|
9
|
|
|
9
|
|
38
|
use warnings; |
|
9
|
|
|
|
|
10
|
|
|
9
|
|
|
|
|
163
|
|
6
|
|
|
|
|
|
|
|
7
|
9
|
|
|
9
|
|
34
|
use Carp (); |
|
9
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
83
|
|
8
|
9
|
|
|
9
|
|
30
|
use Scalar::Util (); |
|
9
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
138
|
|
9
|
|
|
|
|
|
|
|
10
|
9
|
|
|
9
|
|
3397
|
use Directory::Scanner::API::Stream; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
203
|
|
11
|
|
|
|
|
|
|
|
12
|
9
|
|
|
9
|
|
2915
|
use Directory::Scanner::Stream; |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
242
|
|
13
|
9
|
|
|
9
|
|
3304
|
use Directory::Scanner::Stream::Concat; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
1014
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
16
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:STEVAN'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
## static builder constructors |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub for { |
21
|
16
|
|
|
16
|
1
|
20955
|
my (undef, $dir) = @_; |
22
|
16
|
|
|
|
|
93
|
return Directory::Scanner::Stream->new( origin => $dir ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub concat { |
26
|
1
|
|
|
1
|
1
|
10
|
my (undef, @streams) = @_; |
27
|
|
|
|
|
|
|
|
28
|
1
|
50
|
|
|
|
3
|
Carp::confess 'You must provide at least two streams to concat' |
29
|
|
|
|
|
|
|
if scalar @streams < 2; |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
7
|
return Directory::Scanner::Stream::Concat->new( streams => [ @streams ] ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |