File-Find-Object - CPAN Module to Traverse a Directory Tree
The perl 5 distribution ships with the File::Find module, which can be used to traverse directory trees. However, it has some serious limitations:
- It cannot be instantiated, and also makes use of some global variables.
- It cannot be easily interrupted in the middle.
- It does not have an iterative interface.
File-Find-Object is a CPAN module, which was originally created by Olivier Thauvin and now mostly maintained by me (= Shlomi Fish) that aims to address these limitations and more, and provide Perl programmers with a robust, object-oriented and usable alternative.
Project Links
- File-Find-Object on search.cpan.org - download and more information.
- File-Find-Object on kobesearch
- Freshmeat.net Record
Licence
File-Find-Object is multi-licensed under the GNU General Public Licence (GPL) version 2 or later, and the Artistic Licence version 2.0 or later.
News
2009-01-09: File-Find-Object 0.1.6 Was Released With a Huge Speed Boost
Recently, File-Find-Object was benchmarked using a test program that traversed a directory and printed the result. It turned out to run at 2 minutes (120 seconds) while File-Find did it at 4-5 seconds. As a result, we spent a lot of time in optimising File-Find-Object, and now it does the scan at about 30 seconds. These optimisations were integrated into version 0.1.6 which was uploaded to CPAN today and will be available shortly.
One thing to note is that we are now using Class-XSAccessor instead of Class-Accessor, because converting to the former yielded a substantial increase in speed. More information can be found in the Changes file in the distribution.
Coverage of File-Find-Object
Coverage in Shlomi Fish's Blogs
- File-Find-Object Refactoring
- "Shavin' Another Second"
- "Should We Include a Better Alternative to Fild-Find in the perl5 Core?" (16-February-2009)