File::Next::OO is a Perl module with file-finding iterator Wrapper for File::Next::files function.
SYNOPSIS
File::Next::OO is just a wrapper around File::Next::files function. But it is easy to remember and less typing.
Call it always with object notation. Not mixed as in File::Next itself.
use File::Next::OO;
my = File::Next::OO->new( '/tmp', '/var' );
while ( my = ->() ) {
..
}
use File::Next::OO;
my = File::Next::OO->new(
{ file_filter => sub { -f ::Next::OO::name and /.mp3$/ } },
"/tmp"
);
while ( my = ->() ) {
print , $/;
}
# in array context return a list of all matches
my @files = File::Next::OO->new( "/tmp" );
# new and files are aliased use files if you like
my @files = File::Next::OO->files( "/tmp" );
# and the same with dirs
my @dirs = File::Next::OO->dirs('/tmp');
# or in peaces
my = File::Next::OO->dirs( '/tmp' );
while( my = ->() ){
print , "n";
}
Requirements:
· Perl