File Coverage

blib/lib/Iterator/Simple/Locate.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 26 26 100.0


line stmt bran cond sub pod time code
1             # Copyright 2009, 2010, 2011, 2014, 2017, 2018, 2019 Kevin Ryde.
2             #
3             # This file is part of File-Locate-Iterator.
4             #
5             # File-Locate-Iterator is free software; you can redistribute it and/or
6             # modify it under the terms of the GNU General Public License as published
7             # by the Free Software Foundation; either version 3, or (at your option)
8             # any later version.
9             #
10             # File-Locate-Iterator is distributed in the hope that it will be useful,
11             # but WITHOUT ANY WARRANTY; without even the implied warranty of
12             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13             # Public License for more details.
14             #
15             # You should have received a copy of the GNU General Public License along
16             # with File-Locate-Iterator; see the file COPYING. Failing that, go to
17             # .
18              
19              
20             package Iterator::Simple::Locate;
21 1     1   1246 use 5.006;
  1         3  
22 1     1   4 use strict;
  1         2  
  1         16  
23 1     1   4 use warnings;
  1         2  
  1         34  
24 1     1   454 use File::Locate::Iterator;
  1         2  
  1         24  
25 1     1   6 use Iterator::Simple;
  1         11  
  1         95  
26              
27             our $VERSION = 27;
28              
29             sub new {
30 7     7 1 4248 my $class = shift;
31 7         23 my $it = File::Locate::Iterator->new (@_);
32 7     32   38 return Iterator::Simple::iterator (sub { $it->next });
  32         439  
33             }
34              
35             1;
36             __END__