From nobody Thu Sep 05 06:19:14 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wzq2C1GRmz5VGxX; Thu, 05 Sep 2024 06:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wzq2C0FZSz3ytq; Thu, 5 Sep 2024 06:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725517155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xPTlYOxWiJow4k2c3tIzF2zC63ZKAR/fdYEVMCnLFDQ=; b=hl6QltiW9ZtOv+9jkqOvT2aefkWZSkPGnZrgmHlhFQlM9AnL4MonqiMrbUPXH8GV2vxcJx p215hE2M9GLvyE7i/JZI/RQoNaozoGWA0yrIqDzz5jquVo+0TjP8RS3dqM3X9nlVEWVeZx dfRcQ8FACN5Dp0/+AHbeoEjnBwb4MG7IWGWND7OJgbKBR3ExX4INtJ8oGM0xNugy3MYRjb wnlWj8fMH6AP3B6JXC8Gv0JgS+Yz19Rye/EoU4PgSa12wFsSkrJ/QPiu9NQOoaXZqHnM/J WNTERpJvwAP9pTm3uNRJNBWtUoPTPMedtjasJz44691HUcBIk9ppvTGJBWzFaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725517155; a=rsa-sha256; cv=none; b=QX9YiD6WKzWcejTeyjEgZkC0riSRBr+ak4QOBMJHD1Xya82EzktzWj13BeGlyZgD8pWoBi 7pVNh78O3fAOvNiHCRCsaWXL/2KBB4LOQrtdgoDx7UwkK/ixK2XvXypThJbi1mV1gfCtyy Zn1B44zYDAHRaRzMJViLJiJB8XbN0XoDo23oyejtZGFp/hOGR3M9XGjLtu+Ytk1J2iHQ7X Qu+u2ESDfAH6lY6KBwxKenSKMfpAHDYOhSsoZx8+BAPb7cxo6SaMIbXxTXQyXrwcMnFLws RBwmZpGDRX+usvL9xsd5uJNww7VCoBTW66VzcoJZGydI5Z0coROKWVrZs4VQ+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725517155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xPTlYOxWiJow4k2c3tIzF2zC63ZKAR/fdYEVMCnLFDQ=; b=lpO8EjxlJcqMkRJDxYbZRduHGZyej9aLJA0yGFCmXpVVjtl1a8uLx6F9pLeaZpRgOfZy8Q 2B/3h50jKJbIwdC3C/x0eS5dA0YMCfLWE+RBzzeDHPXj8z+C5bu7agsOlgUUR2TRKZIjkP oHInkNLoYvelAXF5odHJu0aXlgXLNuNiCAsynW6qWmaqmEUlPTaQqgyYk94QJc5OKzF/ck eskll8N5/VVkXi7QtUfoT4BYH8W17rRuvzCXiQqDdtbYos0H6wx14WTSrevaJGaEe1ZYWp /vLo0aaRlAwTyzi6GhTSLBErERSvEM8IXdOmDIs6kO5/8GjQFNNmUsnQKhbhfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wzq2B6wpHzxR4; Thu, 5 Sep 2024 06:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4856JEWZ091059; Thu, 5 Sep 2024 06:19:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4856JE5x091056; Thu, 5 Sep 2024 06:19:14 GMT (envelope-from git) Date: Thu, 5 Sep 2024 06:19:14 GMT Message-Id: <202409050619.4856JE5x091056@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: fb04d2cabb14 - main - devel/p5-Data-Sah-Coerce: Add p5-Data-Sah-Coerce 0.054 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb04d2cabb14ffac3ac4bf01567f01f84d58122b Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=fb04d2cabb14ffac3ac4bf01567f01f84d58122b commit fb04d2cabb14ffac3ac4bf01567f01f84d58122b Author: Po-Chuan Hsieh AuthorDate: 2024-09-05 05:13:41 +0000 Commit: Po-Chuan Hsieh 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 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