File::Ignore - Ignore files that are good to ignore
Version 0.021
use File::Ignore; if (File::Ignore->ignore($file)) { # ... Skip ... } else { # Continue to process... } my $good = File::Ignore->include(qw(src/RCS apple.Z doc/apple.txt tags .svn banana.html core)); for my $file (@$good) { # doc/apple.txt # banana.html } my $bad = File::Ignore->exclude([qw(src/RCS apple.Z doc/apple.txt tags .svn banana.html core)]); for my $file (@$bad) { # src/RCS # apple.Z # tags # .svn # core }
Returns true if <file> is one of the ignoreable.
Returns an array reference of each <file> that is NOT ignoreable (should be included)
Returns an array reference of each <file> that IS ignoreable (should be excluded)
Returns a list of what is ignoreable. Currently, this is:
regexp category RCS/ RCS rcs revision rsync SCCS/ SCCS revision rsync sccs CVS/ CVS cvs revision rsync CVS.adm CVS\.adm cvs revision rsync RCSLOG RCSLOG rcs revision rsync cvslog.* cvslog\..* cvs revision rsync tags tags ctags etags rsync TAGS TAGS ctags etags rsync .make.state \.make\.state make rsync .nse_depinfo \.nse_depinfo rsync *~ .*~ rsync #* #.* rsync .#* \.#.* rsync ,* ,.* rsync _$* _\$.* rsync *$ .*\$ rsync *.old .*\.old backup rsync *.bak .*\.bak backup rsync *.BAK .*\.BAK backup rsync *.orig .*\.orig backup rsync *.rej .*\.rej patch rsync .del-* \.del-.* rsync *.a .*\.a object rsync *.olb .*\.olb object rsync *.o .*\.o object rsync *.obj .*\.obj object rsync *.so .*\.so object rsync .exe \.exe object rsync *.Z .*\.Z rsync *.elc .*\.elc rsync *.ln .*\.ln rsync core core core rsync .svn/ \.svn revision rsync svn .sw[p-z] \.sw[p-z] swap vim
The above list was taken from rsync -C
rsync -C
Let me know if you have any thoughts on additions to this list or categorization.
Robert Krimen, <rkrimen at cpan.org>
<rkrimen at cpan.org>
Please report any bugs or feature requests to bug-file-ignore at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Ignore. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-file-ignore at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc File::Ignore
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Ignore
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/File-Ignore
CPAN Ratings
http://cpanratings.perl.org/d/File-Ignore
Search CPAN
http://search.cpan.org/dist/File-Ignore
Copyright 2007 Robert Krimen, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install File::Ignore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Ignore
CPAN shell
perl -MCPAN -e shell install File::Ignore
For more information on module installation, please visit the detailed CPAN module installation guide.