File::Find::Rule::VCS - Exclude files/directories for Version Control Systems
use File::Find::Rule (); use File::Find::Rule::VCS (); # Find all files smaller than 10k, ignoring any CVS files/dirs my @files = File::Find::Rule->ignore_cvs ->file ->size('<10Ki') ->in( $dir );
I find myself doing exclusion of CVS or Subversion directories over and over again in almost every major FFR thing I write.
File::Find::Rule::VCS provides methods to exclude the version control directories of several major Version Control Systems. Initially, this is just CVS and Subversion, but if you have an snippit of FFR code for any other VCS, I'd be happy to take and include it.
$FFR_object->ignore_vcs($vcsname);
The ignore_vcs method excludes the files for a named Version Control
System from your the File::Find::Rule manpage search. The name of the VCS is case
in-sensitive.
Names currently supported are 'cvs', 'svn' and 'subversion'.
As a convenience for high-level APIs, if the VCS name is the defined null string '' then the call will be treated as a nullop.
The use of no param, or of undef, or any other name, will throw an exception.
The ignore_cvs method excluding all CVS directories from your
the File::Find::Rule manpage search.
It will also exclude all the files left around by CVS after an
automated merge that start with '.#' (dot-hash).
The ignore_svn method excluding all Subversion (.svn) directories
from your the File::Find::Rule manpage search.
- Add support for other version control systems.
- Add other useful VCS-related methods
Bugs should always be submitted via the CPAN bug tracker
http://rt.cpan.org/NoAuth/ReportBug.html
For other issues, contact the maintainer
Adam Kennedy <cpan@ali.as>
http://ali.as/, the File::Find::Rule manpage
Copyright 2005, 2006 Adam Kennedy. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.