diff options
| author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2024-09-05 05:13:38 +0000 |
|---|---|---|
| committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2024-09-05 06:11:14 +0000 |
| commit | 43c69bb16b1141e3b2e6b82a272690e99a7f8134 (patch) | |
| tree | 9548d62c2737da5b0e8f6aebede542b03331b187 | |
| parent | d23b930387d195661e6ea068d1ea24f5588f9906 (diff) | |
devel/p5-Data-Cmp: Add p5-Data-Cmp 0.010
This relatively lightweight (no non-core dependencies, under 100 lines of code)
module offers the cmp_data function that, like Perl's cmp, returns -1/0/1 value.
cmp_data differs from cmp in that it can compare two data of different types and
compare data items recursively, with pretty sensible semantics. In addition to
returning -1/0/1, cmp_data can also return 2 if two data differ but not
comparable: there is no sensible notion of which one is "greater than" the
other. An example is empty hash {} vs empty array []).
This module can handle circular structure.
| -rw-r--r-- | devel/Makefile | 1 | ||||
| -rw-r--r-- | devel/p5-Data-Cmp/Makefile | 20 | ||||
| -rw-r--r-- | devel/p5-Data-Cmp/distinfo | 3 | ||||
| -rw-r--r-- | devel/p5-Data-Cmp/pkg-descr | 9 | ||||
| -rw-r--r-- | devel/p5-Data-Cmp/pkg-plist | 6 |
5 files changed, 39 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index a1422df42bd4..fbebdb523eac 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2207,6 +2207,7 @@ SUBDIR += p5-Data-Capture SUBDIR += p5-Data-ClearSilver-HDF SUBDIR += p5-Data-Clone + SUBDIR += p5-Data-Cmp SUBDIR += p5-Data-Compare SUBDIR += p5-Data-Diver SUBDIR += p5-Data-Dmp diff --git a/devel/p5-Data-Cmp/Makefile b/devel/p5-Data-Cmp/Makefile new file mode 100644 index 000000000000..747fb6e2c52b --- /dev/null +++ b/devel/p5-Data-Cmp/Makefile @@ -0,0 +1,20 @@ +PORTNAME= Data-Cmp +PORTVERSION= 0.010 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Compare two data structures, return -1/0/1 like cmp +WWW= https://metacpan.org/dist/Data-Cmp + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= perl5 +USE_PERL5= configure + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/devel/p5-Data-Cmp/distinfo b/devel/p5-Data-Cmp/distinfo new file mode 100644 index 000000000000..692cc8e9bc64 --- /dev/null +++ b/devel/p5-Data-Cmp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1724084444 +SHA256 (Data-Cmp-0.010.tar.gz) = 96cc24b12e90c7f1a583870f13daee244ebcc765a0d8abbb5e49b6b977b45210 +SIZE (Data-Cmp-0.010.tar.gz) = 18145 diff --git a/devel/p5-Data-Cmp/pkg-descr b/devel/p5-Data-Cmp/pkg-descr new file mode 100644 index 000000000000..45a232bff633 --- /dev/null +++ b/devel/p5-Data-Cmp/pkg-descr @@ -0,0 +1,9 @@ +This relatively lightweight (no non-core dependencies, under 100 lines of code) +module offers the cmp_data function that, like Perl's cmp, returns -1/0/1 value. +cmp_data differs from cmp in that it can compare two data of different types and +compare data items recursively, with pretty sensible semantics. In addition to +returning -1/0/1, cmp_data can also return 2 if two data differ but not +comparable: there is no sensible notion of which one is "greater than" the +other. An example is empty hash {} vs empty array []). + +This module can handle circular structure. diff --git a/devel/p5-Data-Cmp/pkg-plist b/devel/p5-Data-Cmp/pkg-plist new file mode 100644 index 000000000000..eb16eb8eb73e --- /dev/null +++ b/devel/p5-Data-Cmp/pkg-plist @@ -0,0 +1,6 @@ +%%SITE_PERL%%/Data/Cmp.pm +%%SITE_PERL%%/Data/Cmp/Numeric.pm +%%SITE_PERL%%/Data/Cmp/StrOrNumeric.pm +%%PERL5_MAN3%%/Data::Cmp.3.gz +%%PERL5_MAN3%%/Data::Cmp::Numeric.3.gz +%%PERL5_MAN3%%/Data::Cmp::StrOrNumeric.3.gz |
