From owner-cvs-ports@FreeBSD.ORG Tue Dec 7 04:08:12 2010 Return-Path: Delivered-To: cvs-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36E831065673; Tue, 7 Dec 2010 04:08:12 +0000 (UTC) (envelope-from pgollucci@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 27AA18FC18; Tue, 7 Dec 2010 04:08:12 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oB748CIq097886; Tue, 7 Dec 2010 04:08:12 GMT (envelope-from pgollucci@repoman.freebsd.org) Received: (from pgollucci@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oB748CB0097885; Tue, 7 Dec 2010 04:08:12 GMT (envelope-from pgollucci) Message-Id: <201012070408.oB748CB0097885@repoman.freebsd.org> From: "Philip M. Gollucci" Date: Tue, 7 Dec 2010 04:08:12 +0000 (UTC) To: ports-committers@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: ports/devel Makefile ports/devel/p5-Data-Rmap Makefile distinfo pkg-descr pkg-plist X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2010 04:08:12 -0000 pgollucci 2010-12-07 04:08:12 UTC FreeBSD ports repository Modified files: devel Makefile Added files: devel/p5-Data-Rmap Makefile distinfo pkg-descr pkg-plist Log: Recursively evaluate a BLOCK over a list of data structures (locally setting $_ to each element) and return the list composed of the results of such evaluations. $_ can be used to modify the elements. Data::Rmap currently traverses HASH, ARRAY, SCALAR and GLOB reference types and ignores others. Depending on which rmap_* wrapper is used, the BLOCK is called for only scalar values, arrays, hashes, references, all elements or a customizable combination. The list of data structures is traversed pre-order in a depth-first fashion. That is, the BLOCK is called for the container reference before is it called for it's elements (although see "recurse" below for post-order). The values of a hash are traversed in the usual "values" order which may affect some applications. If the "cut" subroutine is called in the BLOCK then the traversal stops for that branch, say if you "cut" an array then the code is never called for it's elements (or their sub-elements). To simultaneously return values and cut, simply pass the return list to cut: cut('add','to','returned'); The first parameter to the BLOCK is an object which maintains the state of the traversal. Methods available on this object are described in "State Object" below. WWW: http://search.cpan.org/dist/Data-Rmap/ PR: ports/152629 Submitted by: Gea-Suan Lin Revision Changes Path 1.4156 +1 -0 ports/devel/Makefile 1.1 +22 -0 ports/devel/p5-Data-Rmap/Makefile (new) 1.1 +2 -0 ports/devel/p5-Data-Rmap/distinfo (new) 1.1 +26 -0 ports/devel/p5-Data-Rmap/pkg-descr (new) 1.1 +3 -0 ports/devel/p5-Data-Rmap/pkg-plist (new)