File::Find::Object::Rule - Alternative interface to File::Find::Object
use File::Find::Object::Rule; # find all the subdirectories of a given directory my @subdirs = File::Find::Object::Rule->directory->in( $directory ); # find all the .pm files in @INC my @files = File::Find::Object::Rule->file() ->name( '*.pm' ) ->in( @INC ); # as above, but without method chaining my $rule = File::Find::Object::Rule->new; $rule->file; $rule->name( '*.pm' ); my @files = $rule->in( @INC );
This module has external dependencies on the following modules:
Cwd File::Find::Object File::Spec Number::Compare Test::More Text::Glob
perl Build.PL perl Build test
and if all goes well
perl Build install
Richard Clamp <richardc@unixbeard.net> with input gained from this use.perl discussion: http://use.perl.org/~richardc/journal/6467
Additional proofreading and input provided by Kake, Greg McCarroll, and Andy Lester andy@petdance.com.
Shlomi Fish converted the code to use File::Find::Object instead. All copyrights disclaimed.
Copyright (C) 2002, 2003, 2004, 2006 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
File::Find::Object, Text::Glob, Number::Compare, File::Find::Object::Rule, find(1)
If you want to know about the procedural interface, see File::Find::Object::Rule::Procedural, and if you have an idea for a neat extension File::Find::Object::Rule::Extending
To install File::Find::Object::Rule, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Find::Object::Rule
CPAN shell
perl -MCPAN -e shell install File::Find::Object::Rule
For more information on module installation, please visit the detailed CPAN module installation guide.