File Coverage

blib/lib/Directory/Scanner/API/Stream.pm
Criterion Covered Total %
statement 11 14 78.5
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 15 19 78.9


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   48 use strict;
  8         14  
  8         209  
5 8     8   42 use warnings;
  8         13  
  8         1327  
6              
7             our $VERSION = '0.02';
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 1 18 my ($self) = @_;
24 6         16 my @results;
25 6         29 while ( my $next = $self->next ) {
26 29         960 push @results => $next;
27             }
28 6         43 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__