From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efs1m-0002gm-Vf for guix-patches@gnu.org; Sun, 28 Jan 2018 13:50:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efs1j-0006xZ-BA for guix-patches@gnu.org; Sun, 28 Jan 2018 13:50:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:38635) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efs1j-0006xS-8E for guix-patches@gnu.org; Sun, 28 Jan 2018 13:50:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1efs1j-0007N4-1O for guix-patches@gnu.org; Sun, 28 Jan 2018 13:50:03 -0500 Subject: [bug#30274] [PATCH 02/21] gnu: Add perl-path-iterator-rule. Resent-Message-ID: From: Oleg Pykhalov Date: Sun, 28 Jan 2018 21:48:09 +0300 Message-Id: <20180128184828.32395-2-go.wigust@gmail.com> In-Reply-To: <20180128184828.32395-1-go.wigust@gmail.com> References: <20180128184828.32395-1-go.wigust@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30274@debbugs.gnu.org * gnu/packages/perl.scm (perl-path-iterator-rule): New public variable. --- gnu/packages/perl.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index f79a11f76..0894144f9 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2017 Christopher Allan Webber +;;; Copyright © 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -8810,3 +8811,53 @@ till 5pm\" and \"on the second Tuesday of the month\" and \"between 4pm and 4:15pm\" and \"in the first half of each minute\" and \"in January of 1998\".") (license perl-license))) + +(define-public perl-path-iterator-rule + (package + (name "perl-path-iterator-rule") + (version "1.012") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://cpan/authors/id/D/DA/DAGOLDEN/Path-Iterator-Rule-" + version ".tar.gz")) + (sha256 + (base32 + "1z76avwvwgv4bw28kzx79mmb4449s5l345sn0wljq3dbf4wqigd1")))) + (build-system perl-build-system) + (native-inputs + `(("perl-file-pushd" ,perl-file-pushd) + ("perl-path-tiny" ,perl-path-tiny) + ("perl-test-deep" ,perl-test-deep) + ("perl-test-filename" ,perl-test-filename))) + (propagated-inputs + `(("perl-number-compare" ,perl-number-compare) + ("perl-text-glob" ,perl-text-glob) + ("perl-try-tiny" ,perl-try-tiny))) + (home-page "http://search.cpan.org/dist/Path-Iterator-Rule/") + (synopsis "Iterative, recursive file finder") + (description "Path::Iterator::Rule iterates over files and directories to +identify ones matching a user-defined set of rules. The API is based heavily +on File::Find::Rule, but with more explicit distinction between matching rules +and options that influence how directories are searched. A +Path::Iterator::Rule object is a collection of rules (match criteria) with +methods to add additional criteria. Options that control directory traversal +are given as arguments to the method that generates an iterator. + +A summary of features for comparison to other file finding modules: + +@itemize +@item provides many helper methods for specifying rules +@item offers (lazy) iterator and flattened list interfaces +@item custom rules implemented with callbacks +@item breadth-first (default) or pre- or post-order depth-first searching +@item follows symlinks (by default, but can be disabled) +@item directories visited only once (no infinite loop; can be disabled) +@item doesn't chdir during operation +@item provides an API for extensions +@end itemize + +As a convenience, the PIR module is an empty subclass of this one that is less +arduous to type for one-liners.") + (license asl2.0))) -- 2.15.1