|
NAMEFile::Find::Object::Rule - Alternative interface to File::Find::ObjectVERSIONversion 0.0313SYNOPSISuse 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 ); DESCRIPTIONFile::Find::Object::Rule is a friendlier interface to File::Find::Object . It allows you to build rules which specify the desired files and directories.WARNING : This module is a fork of version 0.30 of File::Find::Rule (which has been unmaintained for several years as of February, 2009), and may still have some bugs due to its reliance on File::Find'isms. As such it is considered Alpha software. Please report any problems with File::Find::Object::Rule to its RT CPAN Queue. METHODS
finderThe File::Find::Object finder instance itself.my @rules = @{$ffor->rules()};The rules to match against. For internal use only.Matching Rules
Query Methods
ExtensionsExtension modules are available from CPAN in the File::Find::Object::Rule namespace. In order to use these extensions either use them directly:use File::Find::Object::Rule::ImageSize; use File::Find::Object::Rule::MMagic; # now your rules can use the clauses supplied by the ImageSize and # MMagic extension or, specify that File::Find::Object::Rule should load them for you: use File::Find::Object::Rule qw( :ImageSize :MMagic ); For notes on implementing your own extensions, consult File::Find::Object::Rule::Extending Further examples
TWO FOR THE PRICE OF ONEFile::Find::Object::Rule also gives you a procedural interface. This is documented in File::Find::Object::Rule::ProceduralEXPORTSfindruleTestsaccessedCorresponds to "-A".asciiCorresponds to "-T".atimeSee "stat tests".binaryCorresponds to "-b".blksizeSee "stat tests".blockCorresponds to "-b".blocksSee "stat tests".changedCorresponds to "-C".characterCorresponds to "-c".ctimeSee "stat tests".devSee "stat tests".directoryCorresponds to "-d".emptyCorresponds to "-z".executableCorresponds to "-x".existsCorresponds to "-e".fifoCorresponds to "-p".fileCorresponds to "-f".gidSee "stat tests".inoSee "stat tests".modeSee "stat tests".modifiedCorresponds to "-M".mtimeSee "stat tests".nlinkSee "stat tests".r_executableCorresponds to "-X".r_ownedCorresponds to "-O".nonemptyA predicate that determines if the file is empty. Uses "-s".ownedCorresponds to "-o".r_readableCorresponds to "-R".r_writeabler_writableCorresponds to "-W".rdevSee "stat tests".readableCorresponds to "-r".setgidCorresponds to "-g".setuidCorresponds to "-u".sizeSee stat tests.socketCorresponds to "-S".stickyCorresponds to "-k".symlinkCorresponds to "-l".uidSee "stat tests".ttyCorresponds to "-t".writable()Corresponds to "-w".BUGSThe code relies on qr// compiled regexes, therefore this module requires perl version 5.005_03 or newer.Currently it isn't possible to remove a clause from a rule object. If this becomes a significant issue it will be addressed. AUTHORRichard Clamp <richardc@unixbeard.net> with input gained from this use.perl discussion: http://use.perl.org/~richardc/journal/6467Additional proofreading and input provided by Kake, Greg McCarroll, and Andy Lester andy@petdance.com. Ported to use File::Find::Object as File::Find::Object::Rule by Shlomi Fish. COPYRIGHTCopyright (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. SEE ALSOFile::Find::Object, Text::Glob, Number::Compare, 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, see File::Find::Object::Rule::Extending . Path::Class::Rule Xs SEE ALSO contains a review of many directory traversal modules on CPAN, including File::Find::Object::Rule and File::Find::Rule (on which this module is based). KNOWN BUGSThe tests don't run successfully when directly inside an old Subversion checkout, due to the presence of ".svn" directories. "./Build disttest" or "./Build distruntest" run fine.SUPPORTWebsitesThe following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.
Bugs / Feature RequestsPlease report any bugs or feature requests by email to "bug-file-find-object-rule at rt.cpan.org", or through the web interface at <https://rt.cpan.org/Public/Bug/Report.html?Queue=File-Find-Object-Rule>. You will be automatically notified of any progress on the request by the system.Source CodeThe code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)<https://github.com/shlomif/http://bitbucket.org/shlomif/perl-file-find-object-rule> git clone git://github.com/shlomif/http://bitbucket.org/shlomif/perl-file-find-object-rule.git AUTHORS
BUGSPlease report any bugs or feature requests on the bugtracker website <https://github.com/shlomif/http://bitbucket.org/shlomif/perl-file-find-object-rule/issues>When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. COPYRIGHT AND LICENSEThis software is copyright (c) 2021 by Richard Clamp.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |