View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Shlomi Fish > File-Find-Object-Rule-VCS > File::Find::Object::Rule::VCS

Download:
File-Find-Object-Rule-VCS-0.0.4.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: v0.0.4   Source  

NAME ^

File::Find::Object::Rule::VCS - Exclude files/directories for Version Control Systems

VERSION ^

version 0.0.4

SYNOPSIS ^

  use File::Find::Object::Rule      ();
  use File::Find::Object::Rule::VCS ();

  # Find all files smaller than 10k, ignoring version control files
  my @files = File::Find::Object::Rule->ignore_vcs
                                      ->file
                                      ->size('<10Ki')
                                      ->in( $dir );

DESCRIPTION ^

Many tools need to be equally useful both on ordinary files, and on code that has been checked out from revision control systems.

File::Find::Object::Rule::VCS provides quick and convenient methods to exclude the version control directories of several major Version Control Systems (currently CVS, subversion, and Bazaar).

File::Find::Object::Rule::VCS implements methods to ignore the following:

CVS
Subversion
Bazaar

In addition, the following version control systems do not create directories in the checkout and do not require the use of any ignore methods

SVK
Git

VERSION ^

version 0.0.4

METHODS ^

ignore_vcs

  # Ignore all common version control systems
  $find->ignore_vcs;

  # Ignore a specific named version control systems
  $find->ignore_vcs($name);

  # Ignore nothing (silent pass-through)
  $find->ignore_vcs('');

The ignore_vcs method excludes the files for a named Version Control System from your File::Find::Object::Rule search.

If passed, the name of the version control system is case in-sensitive. Names currently supported are 'cvs', 'svn', 'subversion', 'bzr', and 'bazaar'.

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.

If no params at all are passed, this method will ignore all supported version control systems. If ignoring every version control system, please note that any legitimate directories called "CVS" or files starting with .# will be ignored, which is not always desirable.

In widely-distributed code, you instead should try to detect the specific version control system used and call ignore_vcs with the specific name.

Passing undef, or an unsupported name, will throw an exception.

ignore_cvs

The ignore_cvs method excluding all CVS directories from your File::Find::Object::Rule search.

It will also exclude all the files left around by CVS after an automated merge that start with '.#' (dot-hash).

ignore_svn

The ignore_svn method excluding all Subversion (.svn) directories from your File::Find::Object::Rule search.

ignore_bzr

The ignore_bzr method excluding all Bazaar (.bzr) directories from your File::Find::Object::Rule search.

ignore_git

The ignore_git method excluding all Git (.git) directories from your File::Find::Object::Rule search.

TO DO ^

- Add support for other version control systems.

- Add other useful VCS-related methods

SUPPORT ^

Bugs should always be submitted via the CPAN bug tracker

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-VCS

For other issues, contact the maintainer

AUTHOR ^

ORIGINAL AUTHOR

Adam Kennedy <adamk@cpan.org>

MAINTAINER

Shlomi Fish, http://www.shlomifish.org/

SEE ALSO ^

http://ali.as/, File::Find::Object::Rule

Note: this code originated from Adam Kennedy's File::Find::Rule::VCS and was span-off/forked with his permission.

COPYRIGHT ^

Copyright 2005 - 2009 Adam Kennedy.

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.

Modification Disclaimer

Modified by Shlomi Fish, 2009. All rights disclaimed.

AUTHOR ^

Shlomi Fish <shlomif@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2018 by Shlomi Fish.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

BUGS ^

Please report any bugs or feature requests on the bugtracker website https://github.com/shlomif/file-find-object-rule-vcs/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.

SUPPORT ^

Perldoc

You can find documentation for this module with the perldoc command.

  perldoc File::Find::Object::Rule::VCS

Websites

The 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 Requests

Please report any bugs or feature requests by email to bug-file-find-object-rule-vcs at rt.cpan.org, or through the web interface at https://rt.cpan.org/Public/Bug/Report.html?Queue=File-Find-Object-Rule-VCS. You will be automatically notified of any progress on the request by the system.

Source Code

The 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/file-find-object-rule-vcs

  git clone http://svn.berlios.de/svnroot/repos/web-cpan/File-Find-Object/
syntax highlighting: