From nobody Thu Sep 5 06:19:25 2024 X-Original-To: dev-commits-ports-all@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 4Wzq2P3kzqz5VGtl; Thu, 05 Sep 2024 06:19:25 +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 4Wzq2P2DcCz40RT; Thu, 5 Sep 2024 06:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725517165; 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=UrDV66/cNfSjnogyV429onYwhehLKp/DhGGzHURIEqc=; b=tDPc2qpmticmM5cAzUbBm3UAE/nz0FwjaZ381c0AGGOI19K5R3ogG5JBWgwgr2EBdIdACm GhuBD+LtAxPx7qRNH/WNTrLc98F9nkGgdIgG46D2XrsGIOlykyt0oxlNYhGTynuKM8zSIP JWZwuzXbPCRS5Jj/LOCfVzYxllGvOaQhwXYAqc4h8S/t/qHesnkG9M0+8Nk6j3lmcRwPZ+ nv5ChJhH3qW7CRniq5XhgXk60o6KezNcKQ6VirMrk6UQuAPTcm5I0HSyu3G77E6Hiu0h0V UKHJtoH+ZuzkTsgMBHKOHX0HwK89WxhhjdYZVg2DGtwAvIUrcVZUAO7fiOuzLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725517165; a=rsa-sha256; cv=none; b=hSed76sWc3169I3BqJHWC+EV9ev4KBjIRG9A2cOq/QM+sQbNISdE1ilyQpMRJGvgQGYl8+ qzraPDZm1B57fg076yjfk3sm+7ONxiMHmp7e5byg4zSdfOVkLxy25AWs7p4vGUIiE33wkK hba/0KGRbzQ+PQEzPkd+GCovVMwBgOH9FYQkrSqnUZ6JuGoCi+0HMDl3w+ew3F/xFeLoOU u8B4xT9Q41lZ4KNa0LVajz9LDjQuc+s85wTvshAv45qZWO1YapfW6uv5lvHRlAUrh0qBEU onB+9PHXqBBNxWqGuOAgTflp8QCWA+Wq67Gur8Q7rkmXp33RbCI5NOnhne72ew== 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=1725517165; 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=UrDV66/cNfSjnogyV429onYwhehLKp/DhGGzHURIEqc=; b=ZamlQOorKiBdUQebk2blr8hA6H51rf+VZzYH8YqUiV6R36QoWCcIi+9aHw0qTVRWtYa9uy S7b83Esn4n8XBikkOu3V/fgYaWtwmLzJ33Dk3g+FJBJc0+89qOGulLckLYuBnvCx9t5Oe7 tXSc6WQnZuoSiT40JuXn80W6ObOLPzPN0QxOx9XShYrFYwo+EyCoC79RQP8KQu3i1jhhlZ KbXs2w3Z9KjtIbrzq7XUrAYdh/XXidehBJbIW5Er0UDZX8pw7DSLf8hZxroc1gIPHU8cP3 GQfzlDYgUFyb0lm5+01oCBM+mVnZnTkBvF0mqu/Ab+AZYxvg3wxqbenxfeCUtA== 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 4Wzq2P1pLVzxCr; Thu, 5 Sep 2024 06:19:25 +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 4856JPQl091422; Thu, 5 Sep 2024 06:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4856JPuV091419; Thu, 5 Sep 2024 06:19:25 GMT (envelope-from git) Date: Thu, 5 Sep 2024 06:19:25 GMT Message-Id: <202409050619.4856JPuV091419@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: e83a453f6a71 - main - devel/p5-Time-Duration-Parse-AsHash: Add p5-Time-Duration-Parse-AsHash 0.10.6 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@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: e83a453f6a713df429323dcd0f0e8b0f7518da27 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=e83a453f6a713df429323dcd0f0e8b0f7518da27 commit e83a453f6a713df429323dcd0f0e8b0f7518da27 Author: Po-Chuan Hsieh AuthorDate: 2024-09-05 05:13:51 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-09-05 06:11:17 +0000 devel/p5-Time-Duration-Parse-AsHash: Add p5-Time-Duration-Parse-AsHash 0.10.6 Time::Duration::Parse::AsHash is like Time::Duration::Parse except: - By default it returns a hashref of parsed duration elements instead of number of seconds There are some circumstances when you want this, e.g. when feeding into DateTime::Duration and you want to count for leap seconds. To return number of seconds like Time::Duration::Parse, pass a true value as the second argument. - By default seconds are not rounded For example: "0.1s" or 100ms will return result { seconds => 0.1 }, and "2.3s" will return { seconds => 2.3 }. Also, <01:02:03> being recognized as 1h2min3s, 01:02:03.4567 will also be recognized as 1h2min3.4567s. - It recognizes more duration units milliseconds (ms), which will be returned in the seconds key, for example "400ms" returns { seconds => 0.4 }. microseconds. This will also be returned in seconds key. nanoseconds (ns). This will also be returned in seconds key. decades. This will be returned in years key, for example "1.5 decades" will return { years => 15 }. - It has a lower startup overhead By avoiding modules like Carp and Exporter::Lite, even strict and warnings (starts up in ~3m vs ~9ms on my computer). --- devel/Makefile | 1 + devel/p5-Time-Duration-Parse-AsHash/Makefile | 20 ++++++++++++++++++++ devel/p5-Time-Duration-Parse-AsHash/distinfo | 3 +++ devel/p5-Time-Duration-Parse-AsHash/pkg-descr | 22 ++++++++++++++++++++++ devel/p5-Time-Duration-Parse-AsHash/pkg-plist | 2 ++ 5 files changed, 48 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 828990f99870..898b634a9e59 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -3812,6 +3812,7 @@ SUBDIR += p5-Time-Crontab SUBDIR += p5-Time-Duration SUBDIR += p5-Time-Duration-Parse + SUBDIR += p5-Time-Duration-Parse-AsHash SUBDIR += p5-Time-Elapsed SUBDIR += p5-Time-Format SUBDIR += p5-Time-HiRes diff --git a/devel/p5-Time-Duration-Parse-AsHash/Makefile b/devel/p5-Time-Duration-Parse-AsHash/Makefile new file mode 100644 index 000000000000..727b60174b52 --- /dev/null +++ b/devel/p5-Time-Duration-Parse-AsHash/Makefile @@ -0,0 +1,20 @@ +PORTNAME= Time-Duration-Parse-AsHash +PORTVERSION= 0.10.6 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Parse string that represents time duration +WWW= https://metacpan.org/dist/Time-Duration-Parse-AsHash + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= perl5 +USE_PERL5= configure + +NO_ARCH= yes + +.include diff --git a/devel/p5-Time-Duration-Parse-AsHash/distinfo b/devel/p5-Time-Duration-Parse-AsHash/distinfo new file mode 100644 index 000000000000..303a86f6be9a --- /dev/null +++ b/devel/p5-Time-Duration-Parse-AsHash/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1724084468 +SHA256 (Time-Duration-Parse-AsHash-0.10.6.tar.gz) = b6776df009d00ef6bc74aa4e487523536b4578fec35dda9a88891b91d0d52831 +SIZE (Time-Duration-Parse-AsHash-0.10.6.tar.gz) = 15754 diff --git a/devel/p5-Time-Duration-Parse-AsHash/pkg-descr b/devel/p5-Time-Duration-Parse-AsHash/pkg-descr new file mode 100644 index 000000000000..099ea0949a25 --- /dev/null +++ b/devel/p5-Time-Duration-Parse-AsHash/pkg-descr @@ -0,0 +1,22 @@ +Time::Duration::Parse::AsHash is like Time::Duration::Parse except: +- By default it returns a hashref of parsed duration elements instead of number + of seconds + There are some circumstances when you want this, e.g. when feeding into + DateTime::Duration and you want to count for leap seconds. + To return number of seconds like Time::Duration::Parse, pass a true value as + the second argument. +- By default seconds are not rounded + For example: "0.1s" or 100ms will return result { seconds => 0.1 }, and "2.3s" + will return { seconds => 2.3 }. + Also, <01:02:03> being recognized as 1h2min3s, 01:02:03.4567 will also be + recognized as 1h2min3.4567s. +- It recognizes more duration units + milliseconds (ms), which will be returned in the seconds key, for example + "400ms" returns { seconds => 0.4 }. + microseconds. This will also be returned in seconds key. + nanoseconds (ns). This will also be returned in seconds key. + decades. This will be returned in years key, for example "1.5 decades" will + return { years => 15 }. +- It has a lower startup overhead + By avoiding modules like Carp and Exporter::Lite, even strict and warnings + (starts up in ~3m vs ~9ms on my computer). diff --git a/devel/p5-Time-Duration-Parse-AsHash/pkg-plist b/devel/p5-Time-Duration-Parse-AsHash/pkg-plist new file mode 100644 index 000000000000..f9c49356c29a --- /dev/null +++ b/devel/p5-Time-Duration-Parse-AsHash/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Time/Duration/Parse/AsHash.pm +%%PERL5_MAN3%%/Time::Duration::Parse::AsHash.3.gz