Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2024 06:19:14 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: fb04d2cabb14 - main - devel/p5-Data-Sah-Coerce: Add p5-Data-Sah-Coerce 0.054
Message-ID:  <202409050619.4856JE5x091056@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fb04d2cabb14ffac3ac4bf01567f01f84d58122b

commit fb04d2cabb14ffac3ac4bf01567f01f84d58122b
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-05 05:13:41 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-05 06:11:15 +0000

    devel/p5-Data-Sah-Coerce: Add p5-Data-Sah-Coerce 0.054
    
    Data::Sah::Coerce contains a standard set of coercion rules for Data::Sah. It is
    separated from the Data-Sah distribution and can be used independently.
    
    A coercion rule is put in
    Data::Sah::Coerce::$COMPILER::To_$TARGET_TYPE::From_$SOURCE_TYPE::DESCRIPTION
    module, for example: Data::Sah::Coerce::perl::To_date::From_float::epoch for
    converting date from integer (Unix epoch) or
    Data::Sah::Coerce::perl::To_date::From_str::iso8601 for converting date from
    ISO8601 strings like "2016-05-15".
    
    Basically, a coercion rule will provide an expression (expr_match) that
    evaluates to true when data can be coerced, and an expression (expr_coerce) to
    actually coerce/convert data to the target type. This rule can be combined with
    other rules to form the final coercion code.
---
 devel/Makefile                     |  1 +
 devel/p5-Data-Sah-Coerce/Makefile  | 30 ++++++++++++
 devel/p5-Data-Sah-Coerce/distinfo  |  3 ++
 devel/p5-Data-Sah-Coerce/pkg-descr | 14 ++++++
 devel/p5-Data-Sah-Coerce/pkg-plist | 94 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 142 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 2d7ebf07864f..ec2643b549f8 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2297,6 +2297,7 @@
     SUBDIR += p5-Data-Rx
     SUBDIR += p5-Data-SExpression
     SUBDIR += p5-Data-Sah
+    SUBDIR += p5-Data-Sah-Coerce
     SUBDIR += p5-Data-Sah-Normalize
     SUBDIR += p5-Data-Section
     SUBDIR += p5-Data-Section-Simple
diff --git a/devel/p5-Data-Sah-Coerce/Makefile b/devel/p5-Data-Sah-Coerce/Makefile
new file mode 100644
index 000000000000..bd25401d42f4
--- /dev/null
+++ b/devel/p5-Data-Sah-Coerce/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	Data-Sah-Coerce
+PORTVERSION=	0.054
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Coercion rules for Data::Sah
+WWW=		https://metacpan.org/dist/Data-Sah-Coerce
+
+LICENSE=	ART10 GPLv1+
+LICENSE_COMB=	dual
+LICENSE_FILE_GPLv1+ =	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${RUN_DEPENDS}
+RUN_DEPENDS=	p5-IPC-System-Options>=0.339:devel/p5-IPC-System-Options \
+		p5-JSON>=0:converters/p5-JSON \
+		p5-JavaScript-QuickJS>=0:lang/p5-JavaScript-QuickJS \
+		p5-Log-ger>=0.038:devel/p5-Log-ger \
+		p5-Time-Duration-Parse-AsHash>=0:devel/p5-Time-Duration-Parse-AsHash \
+		p5-subroutines>=0:devel/p5-subroutines
+TEST_DEPENDS=	p5-Test-Exception>=0:devel/p5-Test-Exception \
+		p5-Test-Needs>=0:devel/p5-Test-Needs
+
+USES=		perl5
+USE_PERL5=	configure
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Data-Sah-Coerce/distinfo b/devel/p5-Data-Sah-Coerce/distinfo
new file mode 100644
index 000000000000..4cea874251c3
--- /dev/null
+++ b/devel/p5-Data-Sah-Coerce/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1724084450
+SHA256 (Data-Sah-Coerce-0.054.tar.gz) = 52e6f8702a5eb55b5dbfcf8118341ee31896f96b2fb6a3700b282ef2fc98ee29
+SIZE (Data-Sah-Coerce-0.054.tar.gz) = 46475
diff --git a/devel/p5-Data-Sah-Coerce/pkg-descr b/devel/p5-Data-Sah-Coerce/pkg-descr
new file mode 100644
index 000000000000..32b418dd2e93
--- /dev/null
+++ b/devel/p5-Data-Sah-Coerce/pkg-descr
@@ -0,0 +1,14 @@
+Data::Sah::Coerce contains a standard set of coercion rules for Data::Sah. It is
+separated from the Data-Sah distribution and can be used independently.
+
+A coercion rule is put in
+Data::Sah::Coerce::$COMPILER::To_$TARGET_TYPE::From_$SOURCE_TYPE::DESCRIPTION
+module, for example: Data::Sah::Coerce::perl::To_date::From_float::epoch for
+converting date from integer (Unix epoch) or
+Data::Sah::Coerce::perl::To_date::From_str::iso8601 for converting date from
+ISO8601 strings like "2016-05-15".
+
+Basically, a coercion rule will provide an expression (expr_match) that
+evaluates to true when data can be coerced, and an expression (expr_coerce) to
+actually coerce/convert data to the target type. This rule can be combined with
+other rules to form the final coercion code.
diff --git a/devel/p5-Data-Sah-Coerce/pkg-plist b/devel/p5-Data-Sah-Coerce/pkg-plist
new file mode 100644
index 000000000000..20a83c5f27e5
--- /dev/null
+++ b/devel/p5-Data-Sah-Coerce/pkg-plist
@@ -0,0 +1,94 @@
+%%SITE_PERL%%/Data/Sah/Coerce.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_bool/From_float/zero_one.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_bool/From_str/common_words.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_date/From_float/epoch.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_date/From_obj/date.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_date/From_str/date_parse.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_datenotime/From_float/epoch.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_datenotime/From_obj/date.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_datenotime/From_str/date_parse.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_datetime/From_float/epoch.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_datetime/From_obj/date.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_datetime/From_str/date_parse.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_duration/From_float/seconds.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_duration/From_str/iso8601.pm
+%%SITE_PERL%%/Data/Sah/Coerce/js/To_timeofday/From_str/hms.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_bool/From_str/common_words.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_float/epoch.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_float/epoch_always.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_float/epoch_always_jakarta.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_float/epoch_always_local.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_float/epoch_jakarta.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_float/epoch_local.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_obj/datetime.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_obj/time_moment.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_date/From_str/iso8601.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datenotime/From_float/epoch.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datenotime/From_float/epoch_always.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datenotime/From_obj/datetime.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datenotime/From_obj/time_moment.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datenotime/From_str/iso8601.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datetime/From_float/epoch.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datetime/From_float/epoch_always.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datetime/From_obj/datetime.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datetime/From_obj/time_moment.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_datetime/From_str/iso8601.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_duration/From_float/seconds.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_duration/From_obj/datetime_duration.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_duration/From_str/hms.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_duration/From_str/human.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_duration/From_str/iso8601.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_float/From_str/percent.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_int/From_str/percent.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_num/From_str/percent.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_timeofday/From_obj/date_timeofday.pm
+%%SITE_PERL%%/Data/Sah/Coerce/perl/To_timeofday/From_str/hms.pm
+%%SITE_PERL%%/Data/Sah/CoerceCommon.pm
+%%SITE_PERL%%/Data/Sah/CoerceJS.pm
+%%PERL5_MAN3%%/Data::Sah::Coerce.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_bool::From_float::zero_one.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_bool::From_str::common_words.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_date::From_float::epoch.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_date::From_obj::date.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_date::From_str::date_parse.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_datenotime::From_float::epoch.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_datenotime::From_obj::date.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_datenotime::From_str::date_parse.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_datetime::From_float::epoch.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_datetime::From_obj::date.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_datetime::From_str::date_parse.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_duration::From_float::seconds.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_duration::From_str::iso8601.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::js::To_timeofday::From_str::hms.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_bool::From_str::common_words.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_float::epoch.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_float::epoch_always.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_float::epoch_always_jakarta.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_float::epoch_always_local.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_float::epoch_jakarta.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_float::epoch_local.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_obj::datetime.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_obj::time_moment.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_date::From_str::iso8601.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datenotime::From_float::epoch.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datenotime::From_float::epoch_always.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datenotime::From_obj::datetime.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datenotime::From_obj::time_moment.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datenotime::From_str::iso8601.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datetime::From_float::epoch.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datetime::From_float::epoch_always.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datetime::From_obj::datetime.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datetime::From_obj::time_moment.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_datetime::From_str::iso8601.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_duration::From_float::seconds.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_duration::From_obj::datetime_duration.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_duration::From_str::hms.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_duration::From_str::human.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_duration::From_str::iso8601.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_float::From_str::percent.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_int::From_str::percent.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_num::From_str::percent.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_timeofday::From_obj::date_timeofday.3.gz
+%%PERL5_MAN3%%/Data::Sah::Coerce::perl::To_timeofday::From_str::hms.3.gz
+%%PERL5_MAN3%%/Data::Sah::CoerceCommon.3.gz
+%%PERL5_MAN3%%/Data::Sah::CoerceJS.3.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409050619.4856JE5x091056>