freebsd-ports/devel/p5-Data-Rmap/Makefile
Philip M. Gollucci 48c84b928b 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 <gslin at gslin.org>
2010-12-07 04:08:11 +00:00

22 lines
410 B
Makefile

# New ports collection makefile for: p5-Data-Rmap
# Date created: 2010-11-28
# Whom: Gea-Suan Lin <gslin@gslin.org>
#
# $FreeBSD$
#
PORTNAME= Data-Rmap
PORTVERSION= 0.62
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= gslin@gslin.org
COMMENT= Recursive map, apply a block to a data structure
PERL_MODBUILD= yes
USE_PERL5_RUN= 5.8.1+
MAN3= Data::Rmap.3
.include <bsd.port.mk>