line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Directory::Scanner::API::Stream; |
2
|
|
|
|
|
|
|
# ABSTRACT: Streaming directory iterator abstract interface |
3
|
|
|
|
|
|
|
|
4
|
8
|
|
|
8
|
|
44
|
use strict; |
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
184
|
|
5
|
8
|
|
|
8
|
|
32
|
use warnings; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
1223
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:STEVAN'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub head; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub is_done; |
13
|
|
|
|
|
|
|
sub is_closed; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub close; |
16
|
|
|
|
|
|
|
sub next; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub clone; # ( $dir => Path::Tiny ) |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
## ... |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub flatten { |
23
|
6
|
|
|
6
|
0
|
26
|
my ($self) = @_; |
24
|
6
|
|
|
|
|
21
|
my @results; |
25
|
6
|
|
|
|
|
36
|
while ( my $next = $self->next ) { |
26
|
29
|
|
|
|
|
1232
|
push @results => $next; |
27
|
|
|
|
|
|
|
} |
28
|
6
|
|
|
|
|
48
|
return @results; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
## ... |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# shhh, I shouldn't do this |
34
|
|
|
|
|
|
|
sub _log { |
35
|
0
|
|
|
0
|
|
|
my ($self, @msg) = @_; |
36
|
0
|
|
|
|
|
|
warn( @msg, "\n" ); |
37
|
0
|
|
|
|
|
|
return; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |