diff options
author | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2010-12-07 04:08:11 +0000 |
---|---|---|
committer | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2010-12-07 04:08:11 +0000 |
commit | 48c84b928b21a49e74129cf893f00ea7ee20529a (patch) | |
tree | 3db97259214f128380d1276e83223ef34a0bc0fc /devel/p5-Data-Rmap | |
parent | cba46e5239ca0f6d87e5a2139e7ae462cdef7a05 (diff) | |
download | ports-48c84b928b21a49e74129cf893f00ea7ee20529a.tar.gz ports-48c84b928b21a49e74129cf893f00ea7ee20529a.zip |
Notes
Diffstat (limited to 'devel/p5-Data-Rmap')
-rw-r--r-- | devel/p5-Data-Rmap/Makefile | 22 | ||||
-rw-r--r-- | devel/p5-Data-Rmap/distinfo | 2 | ||||
-rw-r--r-- | devel/p5-Data-Rmap/pkg-descr | 26 | ||||
-rw-r--r-- | devel/p5-Data-Rmap/pkg-plist | 3 |
4 files changed, 53 insertions, 0 deletions
diff --git a/devel/p5-Data-Rmap/Makefile b/devel/p5-Data-Rmap/Makefile new file mode 100644 index 000000000000..f7874071cc2a --- /dev/null +++ b/devel/p5-Data-Rmap/Makefile @@ -0,0 +1,22 @@ +# 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> diff --git a/devel/p5-Data-Rmap/distinfo b/devel/p5-Data-Rmap/distinfo new file mode 100644 index 000000000000..35219d79f8eb --- /dev/null +++ b/devel/p5-Data-Rmap/distinfo @@ -0,0 +1,2 @@ +SHA256 (Data-Rmap-0.62.tar.gz) = 66686c34dcc32e1fdb6acc1cd6bc55e4b75496c9ca850645a8e3a8953c953c48 +SIZE (Data-Rmap-0.62.tar.gz) = 10129 diff --git a/devel/p5-Data-Rmap/pkg-descr b/devel/p5-Data-Rmap/pkg-descr new file mode 100644 index 000000000000..68ffaba25900 --- /dev/null +++ b/devel/p5-Data-Rmap/pkg-descr @@ -0,0 +1,26 @@ +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/ diff --git a/devel/p5-Data-Rmap/pkg-plist b/devel/p5-Data-Rmap/pkg-plist new file mode 100644 index 000000000000..f2fc472ce025 --- /dev/null +++ b/devel/p5-Data-Rmap/pkg-plist @@ -0,0 +1,3 @@ +@comment $FreeBSD$ +%%SITE_PERL%%/Data/Rmap.pm +@dirrmtry %%SITE_PERL%%/Data |