Port details |
- p5-Time-Duration-Parse-AsHash Parse string that represents time duration
- 0.10.6 devel
=0 Package not present on quarterly.This port was created during this quarter. It will be in the next quarterly branch but not the current one.
- Maintainer: sunpoet@FreeBSD.org
- Port Added: 2024-09-05 06:21:42
- Last Update: 2024-09-05 06:11:17
- Commit Hash: e83a453f
- Also Listed In: perl5
- License: ART10 GPLv1+
- WWW:
- https://metacpan.org/dist/Time-Duration-Parse-AsHash
- Description:
- 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).
- ¦ ¦ ¦ ¦
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - Dependency lines:
-
- p5-Time-Duration-Parse-AsHash>0:devel/p5-Time-Duration-Parse-AsHash
- To install the port:
- cd /usr/ports/devel/p5-Time-Duration-Parse-AsHash/ && make install clean
- To add the package, run one of these commands:
- pkg install devel/p5-Time-Duration-Parse-AsHash
- pkg install p5-Time-Duration-Parse-AsHash
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: p5-Time-Duration-Parse-AsHash
- Flavors: there is no flavor information for this port.
- distinfo:
- TIMESTAMP = 1724084468
SHA256 (Time-Duration-Parse-AsHash-0.10.6.tar.gz) = b6776df009d00ef6bc74aa4e487523536b4578fec35dda9a88891b91d0d52831
SIZE (Time-Duration-Parse-AsHash-0.10.6.tar.gz) = 15754
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- perl5>=5.36<5.37 : lang/perl5.36
- Runtime dependencies:
-
- perl5>=5.36<5.37 : lang/perl5.36
- There are no ports dependent upon this port
Configuration Options:
- No options to configure
- Options name:
- devel_p5-Time-Duration-Parse-AsHash
- USES:
- perl5
- FreshPorts was unable to extract/find any pkg message
- Master Sites:
|
Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
Commit | Credits | Log message |
0.10.6 05 Sep 2024 06:11:17 |
Po-Chuan Hsieh (sunpoet) |
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). |