File::Next::OOFile::Next::OO is a Perl module with file-finding iterator Wrapper for File::Next::files function. | |
Download |
File::Next::OO Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Boris Zentner
- Publisher web site:
- http://search.cpan.org/~borisz/
File::Next::OO Tags
File::Next::OO Description
File::Next::OO is a Perl module with file-finding iterator Wrapper for File::Next::files function. File::Next::OO is a Perl module with file-finding iterator Wrapper for File::Next::files function.SYNOPSISFile::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 $iter = File::Next::OO->new( '/tmp', '/var' ); while ( my $file = $iter->() ) { .. } use File::Next::OO; my $files = File::Next::OO->new( { file_filter => sub { -f $File::Next::OO::name and /.mp3$/ } }, "/tmp" ); while ( my $file = $files->() ) { print $file, $/; } # 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 $dirs = File::Next::OO->dirs( '/tmp' ); while( my $dir = $dirs->() ){ print $dir, "n"; } Requirements: · Perl
File::Next::OO Related Software