houseabsolute / datetime-locale Goto Github PK
View Code? Open in Web Editor NEWLocalization support for DateTime.pm
Home Page: https://metacpan.org/release/DateTime-Locale/
License: Other
Localization support for DateTime.pm
Home Page: https://metacpan.org/release/DateTime-Locale/
License: Other
> perl -MYAML::Syck -MDateTime::Locale -e'my $fr = DateTime::Locale->load("fr"); print Dump($fr->am_pm_abbreviated()); push @{$fr->am_pm_abbreviated()}, 123; print Dump($fr->am_pm_abbreviated());'
---
- AM
- PM
---
- AM
- PM
- 123
One call to a function should not be able to “poison” the results of a subsequent call.
Hi,
Noticed a typo in one of test script.
Proposed patch in a branch "fix-typo-test-message".
diff --git a/t/04format-length.t b/t/04format-length.t
index fbe11d3..a23e5e9 100644
--- a/t/04format-length.t
+++ b/t/04format-length.t
@@ -17,7 +17,7 @@ is(
);
is( $loc->date_format_default, 'y MMM d', 'check default date format' );
-is( $loc->time_format_default, 'HH:mm:ss', 'check default date format' );
+is( $loc->time_format_default, 'HH:mm:ss', 'check default time format' );
$loc->set_default_date_format_length('short');
$loc->set_default_time_format_length('short');
===( 703;5 665/? 1/? 1/? )=======================================
# Failed test 'got an exception trying to read an unreadable file'
# at t/nonexistent-locale.t line 24.
# +--------------------------------+----+--------------------------------+
# | GOT | OP | CHECK |
# +--------------------------------+----+--------------------------------+
# | File '/var/tmp/portage/dev-per | =~ | (?^:No read permission) |
# | l/DateTime-Locale-1.270.0/temp | | |
# | /iPMqstUq4y/auto/share/dist/Da | | |
# | teTime-Locale/unreadable.pl', | | |
# | no read permissions at /var/tm | | |
# | p/portage/dev-perl/DateTime-Lo | | |
# | cale-1.270.0/work/DateTime-Loc | | |
# | ale-1.27/blib/lib/DateTime/Loc | | |
# | ale/Data.pm line 6094.\n | | |
# +--------------------------------+----+--------------------------------+
# Seeded srand with seed '20200829' from local date.
t/nonexistent-locale.t ........... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
Migrated from rt.cpan.org #65717 (status was 'new')
Requestors:
From [email protected] on 2011-02-14 17:20:29:
use DateTime;
my $cldr = DateTime::Locale->load('en');
my $weekdays = $cldr->day_format_abbreviated();
my $sun = pop @$weekdays;
print join ',', @{$cldr->day_format_abbreviated()};
Shouldn't the DateTime::Locale methods return a copy of the array?
It doesn't seem right that manipulating the return of day_format_abbreviated()
should affect the result of future invocations of that function.
OS: Ubuntu 14.04 64bit
Perl version: 5.18.1
DateTime-Locale-Version: 1.12
#!/usr/bin/env perl
use strict;
use warnings;
use DateTime;
use DateTime::Locale;
use v5.10;
my $loc = DateTime::Locale->load('en-GB');
say $loc->native_locale_name, $loc->datetime_format_long;
Can't locate object method "native_locale_name" via package "DateTime::Locale::FromData" at ./a.pl line 9, <DATA> line 1.
maybe native_name is correct instead of native_locale_name in SYNOPSIS?
thanks great module.
For example “Church Slavic (cu), Volapük (vo), Prussian (prg)” “have been moved in the folder structures” in CLDR 38. It led to the removal of these locales in DateTime::Locale
1.29/1.30.
From the ticket CLDR-14080, it seems that these locales have been moved from “common” to “seed” locales depending on the coverage level.
The opposite move has been made for Sanskrit (sa), making these available in DateTime::Locale
1.29/1.30.
It would be useful to list the seed locales in DateTime::Locale
, even though their level of coverage isn’t as high, rather than having locales to disappear when the coverage requirements change. Seed locales could be listed separately from common locales if the coverage level is important to DateTime::Locale
.
DateTime::Locale::Catalog
1.38 is currently naming “Greek” both el
and el-polyton
, whereas it only really fits the first code el
. The new el-polyton
(to CLDR 43) seems to stand for “Polytonic Greek” according to https://en.wikipedia.org/wiki/Greek_diacritics#Computer_encoding.
Locale code Locale name (in English) Native locale name
==========================================================================================================
el Greek Ελληνικά
el-CY Greek Cyprus Ελληνικά Κύπρος
el-GR Greek Greece Ελληνικά Ελλάδα
el-polyton Greek Ἑλληνικά
It handles country codes correctly, but not the polytonic variant.
It seems that the name of this variant is available upstream: https://github.com/unicode-org/cldr-json/blob/43.0.0/cldr-json/cldr-localenames-full/main/en/variants.json#L51
DateTime::Locale::Catalog
is currently naming “Belarusian” both be
and be-tarask
, whereas it only really fits the first code be
which stands for the official Belarusian orthography since 1933 and the second code is for the older variant of orthography which is still informally used. See Belarusian orthography reform of 1933 and Taraškievica.
Locale code Locale name (in English) Native locale name
==========================================================================================================
be Belarusian беларуская
be-tarask Belarusian беларуская
If that is an upstream issue of CLDR or is it due to the way DateTime::Locale
is importing it?
In older versions of this library (Debian jessie - 0.45), I made a subclass of en_US
for some custom changes. Looking at a newish version (Debian stretch - 1.11), that no longer seems to be possible.
I saw the note in DateTime::Locale::Base
saying it is depreciated, which suggests to me that subclassing is no longer the preferred way to handle this.
This is the type of thing I had before:
package DateTime::Locale::en_US_CUSTOM;
use DateTime::Locale::en_US;
use base 'DateTime::Locale::en_US';
sub time_format_full { 'HH:mm:ss zzzz' }
#... a few more of that type
1;
What is the recommended way of handling this in newer versions?
We have the following bug reported to the Debian package of
DateTime-Locale (https://bugs.debian.org/894554):
It doesn't seem to be a bug in the packaging, so you may want to take
a look. Thanks!
------8<-----------8<-----------8<-----------8<-----------8<-----
Package: libdatetime-locale-perl
Version: 1:1.17-1
Severity: normal
Hi,
When loading a DateTime / DateTime::Locale object which was previously
serialized using Storable, DateTime::Locale::FromData::STORABLE_thaw fails if
the code loading the Storable object does not import DateTime::Locale.
To reproduce:
> perl -MStorable -MDateTime::Locale -E 'my $loc = DateTime::Locale->load("en-GB"); store(\$loc, "/tmp/whatever.db")';
> perl -MStorable -E 'my $loc_ref = retrieve("/tmp/whatever.db"); say $$loc_ref->{code}'
Expected behaviour: The second line outputs "en-GB"
Actual behaviour: STORABLE_thaw throws an error:
> Can't locate object method "load" via package "DateTime::Locale" at
> /usr/share/perl5/DateTime/Locale/FromData.pm line 262
Workaround: Import DateTime or DateTime::Locale, e.g.
> perl -MStorable -MDateTime::Locale -E 'my $loc = DateTime::Locale->load("en-GB"); store(\$loc, "/tmp/whatever.db")';
> perl -MStorable -MDateTime::Locale -E 'my $loc_ref = retrieve("/tmp/whatever.db"); say $$loc_ref->{code}'
As far as I know, users should not be required to import DateTime::Locale when
deserializing an object containing locales, so this looks like a bug to me.
It can be fixed by importing the module in DateTime/Locale/FromData.pm:
> diff --git a/lib/DateTime/Locale/FromData.pm b/lib/DateTime/Locale/FromData.pm
> index fd9ab78a..7e6cd622 100644
> --- a/lib/DateTime/Locale/FromData.pm
> +++ b/lib/DateTime/Locale/FromData.pm
> @@ -4,6 +4,7 @@ use strict;
> use warnings;
> use namespace::autoclean;
>
> +use DateTime::Locale;
> use DateTime::Locale::Util qw( parse_locale_code );
> use Params::ValidationCompiler 0.13 qw( validation_for );
> use Specio::Declare;
Thank you for your work,
Daniel
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libdatetime-locale-perl depends on:
ii libfile-sharedir-perl 1.104-1
ii libnamespace-autoclean-perl 0.28-1
ii libparams-validationcompiler-perl 0.27-1
ii libspecio-perl 0.42-1
ii perl 5.26.1-5
ii perl-base [libscalar-list-utils-perl] 5.26.1-5
libdatetime-locale-perl recommends no packages.
libdatetime-locale-perl suggests no packages.
-- no debconf information
------8<-----------8<-----------8<-----------8<-----------8<-----
Thanks for considering,
gregor herrmann,
Debian Perl Group
I'm making this issue pre-emptively in case anyone asks ...
The 41.0.0 release did not include any changes to the data that DateTime-Locale
uses, so there's no need to rebuild the locale data from that release.
After upgrading from 0.45 to 1.04, we are receiving errors like this in our logs. They appear to happen at random.
Bareword found where operator expected at (eval 15681) line 62, near "516c"^J') called at (eval 15681) line 62
eval '1} {0}",
datetime_format_short => "{1} {0}",
day_format_abbreviated => [
"\\N{U+5468}\\N{U+4e00}",
"\\N{U+5468}\\N{U+4e8c}",
"\\N{U+5468}\\N{U+4e09}",
"\\N{U+5468}\\N{U+56db}",
"\\N{U+5468}\\N{U+4e94}",
"\\N{U+5468}\\N{U+516d}",
"\\N{U+5468}\\N{U+65e5}"
],
day_format_narrow => [
"\\N{U+4e00}",
"\\N{U+4e8c}",
"\\N{U+4e09}",
"\\N{U+56db}",
"\\N{U+4e94}",
"\\N{U+516d}",
"\\N{U+65e5}"
],
day_format_wide => [
"\\N{U+661f}\\N{U+671f}\\N{U+4e00}",
"\\N{U+661f}\\N{U+671f}\\N{U+4e8c}",
"\\N{U+661f}\\N{U+671f}\\N{U+4e09}",
"\\N{U+661f}\\N{U+671f}\\N{U+56db}",
"\\N{U+661f}\\N{U+671f}\\N{U+4e94}",
"\\N{U+661f}\\N{U+671f}\\N{U+516d}",
"\\N{U+661f}\\N{U+671f}\\N{U+65e5}"
],
day_stand_alone_abbreviated => [
"\\N{U+5468}\\N{U+4e00}",
"\\N{U+5468}\\N{U+4e8c}",
"\\N{U+5468}\\N{U+4e09}",
"\\N{U+5468}\\N{U+56db}",
"\\N{U+5468}\\N{U+4e94}",
"\\N{U+5468}\\N{U+516d}",
"\\N{U+5468}\\N{U+65e5}"
],
day_stand_alone_narrow => [
"\\N{U+4e00}",
"\\N{U+4e8c}",
"\\N{U+4e09}",
"\\N{U+56db}",
"\\N{U+4e94}",
"\\N{U+516d}",
"\\N{U+65e5}"
],
day_stand_alone_wide => [
"\\N{U+661f}\\N{U+671f}\\N{U+4e00}",
"\\N{U+661f}\\N{U+671f}\\N{U+4e8c}",
"\\N{U+661f}\\N{U+671f}\\N{U+4e09}",
"\\N{U+661f}\\N{U+671f}\\N{U+56db}",
"\\N{U+661f}\\N{U+671f}\\N{U+4e94}",
"\\N{U+661f}\\N{U+671f}\\N{U+516d}",
"\\N{U+661f}\\N{U+671f}\\N{U+65e5}"
],
era_abbreviated => [
"\\N{U+516c}\\N{U+5143}\\N{U+524d}",
"\\N{U+516c}\\N{U+5143}"
],
era_narrow => [
"\\N{U+516c}\\N{U+5143}\\N{U+524d}",
"\\N{U+516c}\\N{U+5143}"
],
era_wide => [
"\\N{U+516c}\\N{U+5143}\\N{U+524d}",
"\\N{U+516c}\\N{U+5143}"
],
first_day_of_week => 1,
glibc_date_1_format => "%a %b %e %H:%M:%S %Z %Y",
glibc_date_format => "/%d/%y",
glibc_datetime_format => "%a %b %e %H:%M:%S %Y",
glibc_time_12_format => "%I:%M:%S %p",
glibc_time_format => "%H:%M:%S",
language => "Chinese",
month_format_abbreviated => [
"1\\N{U+6708}",
"2\\N{U+6708}",
"3\\N{U+6708}",
"4\\N{U+6708}",
"5\\N{U+6708}",
"6\\N{U+6708}",
"7\\N{U+6708}",
"8\\N{U+6708}",
"9\\N{U+6708}",
"10\\N{U+6708}",
"11\\N{U+6708}",
"12\\N{U+6708}"
],
month_format_narrow => [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
month_format_wide => [
"\\N{U+4e00}\\N{U+6708}",
"\\N{U+4e8c}\\N{U+6708}",
"\\N{U+4e09}\\N{U+6708}",
"\\N{U+56db}\\N{U+6708}",
"\\N{U+4e94}\\N{U+6708}",
"\\N{U+516d}\\N{U+6708}",
"\\N{U+4e03}\\N{U+6708}",
"\\N{U+516b}\\N{U+6708}",
"\\N{U+4e5d}\\N{U+6708}",
"\\N{U+5341}\\N{U+6708}",
"\\N{U+5341}\\N{U+4e00}\\N{U+6708}",
"\\N{U+5341}\\N{U+4e8c}\\N{U+6708}"
],
month_stand_alone_abbreviated => [
"1\\N{U+6708}",
"2\\N{U+6708}",
"3\\N{U+6708}",
"4\\N{U+6708}",
"5\\N{U+6708}",
"6\\N{U+6708}",
"7\\N{U+6708}",
"8\\N{U+6708}",
"9\\N{U+6708}",
"10\\N{U+6708}",
"11\\N{U+6708}",
"12\\N{U+6708}"
],
month_stand_alone_narrow => [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
month_stand_alone_wide => [
"\\N{U+4e00}\\N{U+6708}",
"\\N{U+4e8c}\\N{U+6708}",
"\\N{U+4e09}\\N{U+6708}",
"\\N{U+56db}\\N{U+6708}",
"\\N{U+4e94}\\N{U+6708}",
"\\N{U+516d}\\N{U+6708}",
"\\N{U+4e03}\\N{U+6708}",
"\\N{U+516b}\\N{U+6708}",
"\\N{U+4e5d}\\N{U+6708}",
"\\N{U+5341}\\N{U+6708}",
"\\N{U+5341}\\N{U+4e00}\\N{U+6708}",
"\\N{U+5341}\\N{U+4e8c}\\N{U+6708}"
],
name => "Chinese",
native_language => "\\N{U+4e2d}\\N{U+6587}",
native_name => "\\N{U+4e2d}\\N{U+6587}",
native_script => undef,
native_territory => undef,
native_variant => undef,
quarter_format_abbreviated => [
"1\\N{U+5b63}\\N{U+5ea6}",
"2\\N{U+5b63}\\N{U+5ea6}",
"3\\N{U+5b63}\\N{U+5ea6}",
"4\\N{U+5b63}\\N{U+5ea6}"
],
quarter_format_narrow => [
1,
2,
3,
4
],
quarter_format_wide => [
"\\N{U+7b2c}\\N{U+4e00}\\N{U+5b63}\\N{U+5ea6}",
"\\N{U+7b2c}\\N{U+4e8c}\\N{U+5b63}\\N{U+5ea6}",
"\\N{U+7b2c}\\N{U+4e09}\\N{U+5b63}\\N{U+5ea6}",
"\\N{U+7b2c}\\N{U+56db}\\N{U+5b63}\\N{U+5ea6}"
],
quarter_stand_alone_abbreviated => [
"1\\N{U+5b63}\\N{U+5ea6}",
"2\\N{U+5b63}\\N{U+5ea6}",
"3\\N{U+5b63}\\N{U+5ea6}",
"4\\N{U+5b63}\\N{U+5ea6}"
],
quarter_stand_alone_narrow => [
1,
2,
3,
4
],
quarter_stand_alone_wide => [
"\\N{U+7b2c}\\N{U+4e00}\\N{U+5b63}\\N{U+5ea6}",
"\\N{U+7b2c}\\N{U+4e8c}\\N{U+5b63}\\N{U+5ea6}",
"\\N{U+7b2c}\\N{U+4e09}\\N{U+5b63}\\N{U+5ea6}",
"\\N{U+7b2c}\\N{U+56db}\\N{U+5b63}\\N{U+5ea6}"
],
script => undef,
territory => undef,
time_format_full => "zzzz ah:mm:ss",
time_format_long => "z ah:mm:ss",
time_format_medium => "ah:mm:ss",
time_format_short => "ah:mm",
variant => undef,
version => 29
}
__[ zh-Hans-HK ]__
{
am_pm_abbreviated => [
"\\N{U+4e0a}\\N{U+5348}",
"\\N{U+4e0b}\\N{U+5348}"
],
available_formats => {
E => "ccc",
EHm => "EHH:mm",
EHms => "EHH:mm:ss",
Ed => "d\\N{U+65e5}E",
Ehm => "E ah:mm",
Ehms => "E ah:mm:ss",
Gy => "Gy\\N{U+5e74}",
GyMMM => "Gy\\N{U+5e74}M\\N{U+6708}",
GyMMMEd => "Gy\\N{U+5e74}M\\N{U+6708}d\\N{U+65e5}E",
GyMMMd => "Gy\\N{U+5e74}M\\N{U+6708}d\\N{U+65e5}",
H => "H\\N{U+65f6}",
HHmm => "HH:mm",
Hm => "HH:mm",
Hms => "HH:mm:ss",
Hmsv => "v HH:mm:ss",
Hmv => "v HH:mm",
M => "M\\N{U+6708}",
MEd => "E, d/M",
MMM => "LLL",
MMMEd => "M\\N{U+6708}d\\N{U+65e5}E",
MMMMd => "M\\N{U+6708}d\\N{U+65e5}",
MMMMdd => "M\\N{U+6708}d\\N{U+65e5}",
MMMd => "M\\N{U+6708}d\\N{U+65e5}",
MMdd => "dd/MM",
Md => "d/M",
d => "d\\N{U+65e5}",
h => "ah\\N{U+65f6}",
hm => "ah:mm",
hms => "ah:mm:ss",
hmsv => "v ah:mm:ss",
hmv => "v ah:mm",
ms => "mm:ss",
y => "y\\N{U+5e74}",
yM => "M/y",
yMEd => "d/M/y\\N{U+ff08}E\\N{U+ff09}",
yMM => "MM/y",
yMMM => "y\\N{U+5e74}M\\N{U+6708}",
yMMMEd => "y\\N{U+5e74}M\\N{U+6708}d\\N{U+65e5}E",
yMMMM => "y\\N{U+5e74}M\\N{U+6708}",
yMMMd => "y\\N{U+5e74}M\\N{U+6708}d\\N{U+65e5}",
yMd => "d/M/y",
yQQQ => "y\\N{U+5e74}\\N{U+7b2c}Q\\N{U+5b63}\\N{U+5ea6}",
yQQQQ => "y\\N{U+5e74}\\N{U+7b2c}Q\\N{U+5b63}\\N{U+5ea6}"
},
code => "zh-Hans-HK",
date_format_full => "y\\N{U+5e74}M\\N{U+6708}d\\N{U+65e5}EEEE",
date_format_long => "y\\N{U+5e74}M\\N{U+6708}d\\N{U+65e5}",
date_format_medium => "y\\N{U+5e74}M\\N{U+6708}d\\N{U+65e5}",
date_format_short => "d/M/yy",
datetime_format_full => "{1}' at /opt/perl5.20.2/lib/site_perl/5.20.2/DateTime/Locale/Data.pm line 8492
DateTime::Locale::Data::locale_data('zh') called at /opt/perl5.20.2/lib/site_perl/5.20.2/DateTime/Locale.pm line 278
DateTime::Locale::_locale_object_for('DateTime::Locale', 'zh') called at /opt/perl5.20.2/lib/site_perl/5.20.2/DateTime/Locale.pm line 213
DateTime::Locale::load(undef, 'zh') called at /opt/perl5.20.2/lib/site_perl/5.20.2/MM/Website/Util.pm line 279
I've tried to update Strawberry PERL 5.26.2 to DateTime:.Locale 1.19. Unfortunately this failed.
Work directory is C:\Users\ADRIAN~1/.cpanm/work/1525585697.6544
You have make C:\Strawberry\c\bin\gmake.exe
You have LWP 6.33
You have C:\gnuWin32\bin\tar.exe, C:\texlive\2018\bin\win32\gzip.exe and C:\ezWinPorts\bin\bzip2.exe
You have C:\texlive\2018\bin\win32\unzip.exe
Searching DateTime::Locale () on cpanmetadb ...
--> Working on DateTime::Locale
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-1.19.tar.gz
-> OK
Unpacking DateTime-Locale-1.19.tar.gz
Entering DateTime-Locale-1.19
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Checking if you have Dist::CheckConflicts 0.02 ... Yes (0.11)
Checking if you have File::ShareDir::Install 0.06 ... Yes (0.11)
Configuring DateTime-Locale-1.19
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for DateTime::Locale
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have File::Temp 0 ... Yes (0.2304)
Checking if you have warnings 0 ... Yes (1.37)
Checking if you have CPAN::Meta::Check 0.011 ... Yes (0.014)
Checking if you have namespace::autoclean 0.19 ... Yes (0.28)
Checking if you have utf8 0 ... Yes (1.19)
Checking if you have IPC::System::Simple 0 ... Yes (1.25)
Checking if you have Test::Warnings 0 ... Yes (0.026)
Checking if you have strict 0 ... Yes (1.11)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have Exporter 0 ... Yes (5.72)
Checking if you have Test::More 0.96 ... Yes (1.302136)
Checking if you have Test::Fatal 0 ... Yes (0.014)
Checking if you have Carp 0 ... Yes (1.42)
Checking if you have File::ShareDir 0 ... Yes (1.104)
Checking if you have Specio::Library::String 0 ... Yes (0.42)
Checking if you have File::Spec 0 ... Yes (3.74)
Checking if you have Params::ValidationCompiler 0.13 ... Yes (0.27)
Checking if you have Dist::CheckConflicts 0.02 ... Yes (0.11)
Checking if you have List::Util 1.45 ... Yes (1.50)
Checking if you have Test::Requires 0 ... Yes (0.10)
Checking if you have base 0 ... Yes (2.26)
Checking if you have Specio::Declare 0 ... Yes (0.42)
Checking if you have CPAN::Meta::Requirements 0 ... Yes (2.140)
Checking if you have Test::File::ShareDir::Dist 0 ... Yes (1.001002)
Checking if you have Storable 0 ... Yes (3.11)
Building and testing DateTime-Locale-1.19
cp share\yi-001.pl blib\lib\auto\share\dist\DateTime-Locale\yi-001.pl
(...)
cp lib/DateTime/Locale/zh_Hant_TW.pod blib\lib\DateTime\Locale\zh_Hant_TW.pod
Skip blib\lib\auto\share\dist\DateTime-Locale\es-PA.pl (unchanged)
(...)
Skip blib\lib\auto\share\dist\DateTime-Locale\fr-GA.pl (unchanged)
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
#
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
# Module Want Have
# ----------------------- ---- ----
# Dist::CheckConflicts 0.02 0.11
# ExtUtils::MakeMaker any 7.34
# File::ShareDir::Install 0.06 0.11
#
# === Build Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Test Requires ===
#
# Module Want Have
# -------------------------- ----- --------
# CPAN::Meta::Check 0.011 0.014
# CPAN::Meta::Requirements any 2.140
# ExtUtils::MakeMaker any 7.34
# File::Spec any 3.74
# File::Temp any 0.2304
# IPC::System::Simple any 1.25
# Storable any 3.11
# Test::Fatal any 0.014
# Test::File::ShareDir::Dist any 1.001002
# Test::More 0.96 1.302136
# Test::Requires any 0.10
# Test::Warnings any 0.026
# base any 2.26
# utf8 any 1.19
#
# === Test Recommends ===
#
# Module Want Have
# ---------- -------- --------
# CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
# Module Want Have
# -------------------------- ---- -----
# Carp any 1.42
# Dist::CheckConflicts 0.02 0.11
# Exporter any 5.72
# File::ShareDir any 1.104
# List::Util 1.45 1.50
# Params::ValidationCompiler 0.13 0.27
# Specio::Declare any 0.42
# Specio::Library::String any 0.42
# namespace::autoclean 0.19 0.28
# strict any 1.11
# warnings any 1.37
#
t/00-report-prereqs.t ........ ok
t/01basic.t .................. ok
t/02iso639-2.t ............... ok
t/03alias.t .................. ok
t/04format-length.t .......... ok
t/05register.t ............... ok
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
"C:\Strawberry\perl\bin\perl.exe" unexpectedly returned exit value 255 at t/06storable.t line 54.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 3.
t/06storable.t ...............
Dubious, test returned 255 (wstat 65280, 0xff00)
All 3 subtests passed
t/07script.t ................. ok
t/09version-check.t .......... ok
t/10code-case-insensitive.t .. ok
t/11load-name.t .............. ok
t/zzz-check-breaks.t ......... ok
Test Summary Report
-------------------
t/06storable.t (Wstat: 65280 Tests: 3 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
Files=12, Tests=810, 30 wallclock secs ( 0.95 usr + 0.06 sys = 1.01 CPU)
Result: FAIL
Failed 1/12 test programs. 0/810 subtests failed.
gmake: *** [Makefile:1645: test_dynamic] Error 255
-> FAIL Installing DateTime::Locale failed. See C:\Users\ADRIAN~1\.cpanm\work\1525585697.6544\build.log for details. Retry with --force to force install it.
Version 38 changes the en_GB abbreviation for "September" from "Sep" to "Sept", so upgrading to DateTime-Locale v1.29 or later can break code that generates/parses short dates.
I have reported it to Unicode CLDR issues https://unicode-org.atlassian.net/browse/CLDR-14412
Installing DateTime::Locale on a Macbook Pro M1. OSX Ventura 13.3.1.
Perl v5.30.3.
While installing DateTime::Locale on a new MacBook, test phase fails.
t/version-check.t ................ Test2 version 1.302167 required--this is only version 1.302162 at /System/Library/Perl/Extras/5.30/Test2/Plugin/NoWarnings.pm line 9.
BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.30/Test2/Plugin/NoWarnings.pm line 9.
Compilation failed in require at t/version-check.t line 5.
BEGIN failed--compilation aborted at t/version-check.t line 5.
t/version-check.t ................ Dubious, test returned 255 (wstat 65280, 0xff00)
Once Test2 is installed DateTime::Locale installs ok.
Migrated from rt.cpan.org #78229 (status was 'new')
Requestors:
From [email protected] (@theory) on 2012-07-05 21:16:01:
The DateTime::Locale::Base docs say:
$locale->datetime_formats()
Returns a hash reference of CLDR date patterns for the datetime formats, where the keys are "full", "long", "medium", and "short".
However, the method does not seem to be implemented:
> perl -MDateTime -E 'say DateTime->now->locale->datetime_formats'
Can't locate object method "datetime_formats" via package "DateTime::Locale::en_US" at -e line 1.
Oversite? FWIW, time_formats and date_formats do exist:
> perl -MDateTime -E 'say DateTime->now->locale->date_formats'
HASH(0x7fb9e92ca6f0)
> perl -MDateTime -E 'say DateTime->now->locale->time_formats'
HASH(0x7fa47baca6f0)
Thanks,
David
It seems that DateTime-Locale-1.37 breaks t/13strftime.t in the test suite of DateTime-1.58:
# Failed test '%c is Sep 7, 1999, 1:02:42 PM'
# at t/13strftime.t line 313.
# got: 'Sep 7, 1999, 1:02:42 PM'
# expected: 'Sep 7, 1999, 1:02:42 PM'
# Failed test '%X is 1:02:42 PM'
# at t/13strftime.t line 313.
# got: '1:02:42 PM'
# expected: '1:02:42 PM'
# Looks like you failed 2 tests of 49.
# Failed test 'en-US'
# at t/13strftime.t line 318.
# Looks like you failed 1 test of 11.
t/13strftime.t ...........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/11 subtests
The difference seems to be the usage of NARROW NO-BREAK SPACE now.
This would make seeing changes between versions much easier.
In the latest patch you have made a tweak where when you pass in month sep it now breaks the return, as the expected format is now sept, this causes issues going forwards as all the months expect a 3 letter abbrievation so jan,feb, mar which makes it very inconsistant when it comes to september and in the code you will have to change the date passed into be sept instead of sep in this instance
my $parser = DateTime::Format::Strptime->new(
pattern => ('%Y-%m-%d %H:%M:%S'),
locale => 'en_GB',
time_zone => '-0000',
);
using the above code causes the problem as datetime::format:strptime uses datetime::locale
I'm attempting to make test
under Perl 5.24 but getting this warning:
# *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***
#
# The following REQUIRED prerequisites were not satisfied:
#
# List::Util version '1.42_02' is not in required range '1.45'
5.24 is the latest stable version of perl, so could the List::Util version dependency be relaxed a bit?
See the failure here.
version-check.t
fails thus:
Test2 version 1.302167 required--this is only version 1.302162 at /System/Library/Perl/Extras/5.30/Test2/Plugin/NoWarnings.pm line 9.
BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.30/Test2/Plugin/NoWarnings.pm line 9.
Compilation failed in require at t/version-check.t line 5.
BEGIN failed--compilation aborted at t/version-check.t line 5.
NB that this is a compile-time error, not an actual test failure. In TEST_REQUIRES
you have:
"Test2::V0" => 0,
...
"Test::More" => "1.302015",
so it looks like the declared version dependency is satisfied (my 1.302162 is more recent than 1.302015), and that any "fresh out of the box" 5.30.x will be affected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.