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   1359 use 5.006;
  1         4  
22 1     1   5 use strict;
  1         2  
  1         20  
23 1     1   5 use warnings;
  1         2  
  1         25  
24 1     1   541 use File::Locate::Iterator;
  1         2  
  1         31  
25 1     1   7 use Iterator::Simple;
  1         13  
  1         113  
26              
27             our $VERSION = 28;
28              
29             sub new {
30 7     7 1 5248 my $class = shift;
31 7         28 my $it = File::Locate::Iterator->new (@_);
32 7     32   39 return Iterator::Simple::iterator (sub { $it->next });
  32         542  
33             }
34              
35             1;
36             __END__