DateTime-Locale-FromCLDR

 view release on metacpan or  search on metacpan

t/01.locale.t  view on Meta::CPAN

	        Bhm => [qw( B h m )],
	        d => ["d"],
	        default => ["default"],
	        Gy => [qw( G y )],
	        GyM => [qw( G M y )],
	        GyMd => [qw( d G M y )],
	        GyMEd => [qw( d G M y )],
	        GyMMM => [qw( G M y )],
	        GyMMMd => [qw( d G M y )],
	        GyMMMEd => [qw( d G M y )],
	        H => ["H"],
	        h => [qw( a h )],
	        hm => [qw( a h m )],
	        Hm => [qw( H m )],
	        Hmv => [qw( H m )],
	        hmv => [qw( a h m )],
	        hv => [qw( a h )],
	        Hv => ["H"],
	        M => ["M"],
	        Md => [qw( d M )],
	        MEd => [qw( d M )],
	        MMM => ["M"],
	        MMMd => [qw( d M )],
	        MMMEd => [qw( d M )],
	        y => ["y"],
	        yM => [qw( M y )],
	        yMd => [qw( d M y )],
	        yMEd => [qw( d M y )],
	        yMMM => [qw( M y )],
	        yMMMd => [qw( d M y )],
	        yMMMEd => [qw( d M y )],
	        yMMMM => [qw( M y )],
	    },
        is_ltr => q{0},
        is_rtl => q{1},
        language => q{English},
        language_code => q{en},
        locale => q{en},
        locale_number_system => ["latn", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],
        month_format_abbreviated => ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        month_format_narrow => ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
        month_format_wide => ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
        month_stand_alone_abbreviated => ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        month_stand_alone_narrow => ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
        month_stand_alone_wide => ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
        name => q{English},
        native_language => q{English},
        native_name => q{English},
        native_script => undef,
        native_territory => undef,
        native_variant => undef,
        native_variants => [],
        number_symbols => {
	        approximately => "~",
	        decimal => ".",
	        exponential => "E",
	        group => ",",
	        infinity => "∞",
	        list => ";",
	        minus => "-",
	        nan => "NaN",
	        per_mille => "‰",
	        percent => "%",
	        plus => "+",
	        superscript => "×",
	        time_separator => ":",
	    },
        number_system => q{latn},
        number_systems => {
	        finance => undef,
	        native => "latn",
	        number_system => "latn",
	        traditional => undef,
	    },
        number_system_digits => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
        prefers_24_hour_time => q{0},
        quarter_format_abbreviated => ["Q1", "Q2", "Q3", "Q4"],
        quarter_format_narrow => ["1", "2", "3", "4"],
        quarter_format_wide => ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
        quarter_stand_alone_abbreviated => ["Q1", "Q2", "Q3", "Q4"],
        quarter_stand_alone_narrow => ["1", "2", "3", "4"],
        quarter_stand_alone_wide => ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
        script => undef,
        script_code => undef,
        territory => undef,
        territory_code => undef,
        territory_info => {
	        calendars => undef,
	        contains => undef,
	        currency => "USD",
	        first_day => 7,
	        gdp => 24660000000000,
	        languages => [qw(
	            en es zh-Hant fr de fil it vi ko ru mww nv yi pdc hnj
	            haw frc chr esu dak cho lkt ik mus oka io cic cad jbo
	            osa
	        )],
	        literacy_percent => 99,
	        min_days => 1,
	        parent => "021",
	        population => 341963000,
	        status => "regular",
	        territory => "US",
	        territory_id => 297,
	        weekend => undef,
	    },
        time_format_allowed => ["h", "hb", "H", "hB"],
        time_format_default => q{h:mm:ss a},
        time_format_full => q{h:mm:ss a zzzz},
        time_format_long => q{h:mm:ss a z},
        time_format_medium => q{h:mm:ss a},
        time_format_preferred => q{h},
        time_format_short => q{h:mm a},
        time_formats => {
	        full => "h:mm:ss a zzzz",
	        long => "h:mm:ss a z",
	        medium => "h:mm:ss a",
	        short => "h:mm a",
	    },
        timezone_format_gmt => q{GMT{0}},
        timezone_format_gmt_zero => q{GMT},

t/01.locale.t  view on Meta::CPAN

        day_format_narrow => ["M", "T", "W", "T", "F", "S", "S"],
        day_format_short => ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
        day_format_wide => ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
        day_periods => {
	        afternoon1 => [qw( 12:00 18:00 )],
	        evening1 => [qw( 18:00 21:00 )],
	        midnight => [qw( 00:00 00:00 )],
	        morning1 => [qw( 00:00 12:00 )],
	        night1 => [qw( 21:00 24:00 )],
	        noon => [qw( 12:00 12:00 )],
	    },
        day_stand_alone_abbreviated => ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
        day_stand_alone_narrow => ["M", "T", "W", "T", "F", "S", "S"],
        day_stand_alone_short => ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
        day_stand_alone_wide => ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
        default_date_format_length => q{medium},
        default_time_format_length => q{medium},
        era_abbreviated => ["BC", "AD"],
        era_narrow => ["B", "A"],
        era_wide => ["Before Christ", "Anno Domini"],
        first_day_of_week => q{1},
        interval_formats => {
	        d => ["d"],
	        GyMMMEEEEd => [qw( d G M y )],
	        M => ["M"],
	        MMMd => ["d"],
	        MMMEd => ["d"],
	        y => ["y"],
	        yMMMd => ["d"],
	        yMMMEd => ["d"],
	        yMMMEEEEd => [qw( d M y )],
	        yMMMMEEEEd => [qw( d M y )],
	    },
        is_ltr => q{0},
        is_rtl => q{1},
        language => q{English},
        language_code => q{en},
        locale => q{en-GB},
        locale_number_system => ["latn", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],
        month_format_abbreviated => ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        month_format_narrow => ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
        month_format_wide => ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
        month_stand_alone_abbreviated => ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        month_stand_alone_narrow => ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
        month_stand_alone_wide => ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
        name => q{British English},
        native_language => q{English},
        native_name => q{British English},
        native_script => undef,
        native_territory => q{United Kingdom},
        native_variant => undef,
        native_variants => [],
        number_symbols => {
	        approximately => "~",
	        decimal => ".",
	        exponential => "E",
	        group => ",",
	        infinity => "∞",
	        list => ";",
	        minus => "-",
	        nan => "NaN",
	        per_mille => "‰",
	        percent => "%",
	        plus => "+",
	        superscript => "×",
	        time_separator => ":",
	    },
        number_system => q{latn},
        number_systems => {
	        finance => undef,
	        native => "latn",
	        number_system => "latn",
	        traditional => undef,
	    },
        number_system_digits => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
        prefers_24_hour_time => q{1},
        quarter_format_abbreviated => ["Q1", "Q2", "Q3", "Q4"],
        quarter_format_narrow => ["1", "2", "3", "4"],
        quarter_format_wide => ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
        quarter_stand_alone_abbreviated => ["Q1", "Q2", "Q3", "Q4"],
        quarter_stand_alone_narrow => ["1", "2", "3", "4"],
        quarter_stand_alone_wide => ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
        script => undef,
        script_code => undef,
        territory => q{United Kingdom},
        territory_code => q{GB},
        territory_info => {
	        calendars => undef,
	        contains => undef,
	        currency => "GBP",
	        first_day => 1,
	        gdp => 3700000000000,
	        languages => [qw(
	            en fr de es pl pa ur ta gu sco cy ro bn ar zh-Hant it lt
	            pt so tr ga gd kw pi en-Shaw
	        )],
	        literacy_percent => 99,
	        min_days => 4,
	        parent => 154,
	        population => 68459100,
	        status => "regular",
	        territory => "GB",
	        territory_id => 121,
	        weekend => undef,
	    },
        time_format_allowed => ["H", "h", "hb", "hB"],
        time_format_default => q{HH:mm:ss},
        time_format_full => q{HH:mm:ss zzzz},
        time_format_long => q{HH:mm:ss z},
        time_format_medium => q{HH:mm:ss},
        time_format_preferred => q{H},
        time_format_short => q{HH:mm},
        time_formats => {
	        full => "HH:mm:ss zzzz",
	        long => "HH:mm:ss z",
	        medium => "HH:mm:ss",
	        short => "HH:mm",
	    },
        timezone_format_gmt => q{GMT{0}},
        timezone_format_gmt_zero => q{GMT},
        timezone_format_hour => ["+HH:mm", "-HH:mm"],

t/01.locale.t  view on Meta::CPAN

        first_day_of_week => q{1},
        interval_formats => {
	        Gy => [qw( G y )],
	        GyM => [qw( G M y )],
	        GyMd => [qw( d G M y )],
	        GyMEd => [qw( d G M y )],
	        GyMMM => [qw( G M y )],
	        GyMMMd => [qw( d G M y )],
	        GyMMMEd => [qw( d G M y )],
	        H => ["H"],
	        Hm => [qw( H m )],
	        hm => [qw( a h m )],
	        hmv => [qw( a h m )],
	        Hmv => [qw( H m )],
	        Hv => ["H"],
	        M => ["M"],
	        Md => [qw( d M )],
	        MEd => [qw( d M )],
	        MMM => ["M"],
	        MMMd => [qw( d M )],
	        MMMEd => [qw( d M )],
	        MMMMd => [qw( d M )],
	        MMMMEd => [qw( d M )],
	        yM => [qw( M y )],
	        yMd => [qw( d M y )],
	        yMEd => [qw( d M y )],
	        yMMM => [qw( M y )],
	        yMMMd => [qw( d M y )],
	        yMMMEd => [qw( d M y )],
	        yMMMM => [qw( M y )],
	        yMMMMd => [qw( d M y )],
	        yMMMMEd => [qw( d M y )],
	    },
        is_ltr => q{0},
        is_rtl => q{1},
        language => q{Spanish},
        language_code => q{es},
        locale => q{es-005-valencia},
        locale_number_system => ["latn", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],
        month_format_abbreviated => ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sept", "oct", "nov", "dic"],
        month_format_narrow => ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
        month_format_wide => ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
        month_stand_alone_abbreviated => ["M01", "M02", "M03", "M04", "M05", "M06", "M07", "M08", "M09", "M10", "M11", "M12"],
        month_stand_alone_narrow => ["E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
        month_stand_alone_wide => ["M01", "M02", "M03", "M04", "M05", "M06", "M07", "M08", "M09", "M10", "M11", "M12"],
        name => q{Spanish},
        native_language => q{español},
        native_name => q{español},
        native_script => undef,
        native_territory => q{Sudamérica},
        native_variant => q{Valenciano},
        native_variants => ["Valenciano"],
        number_symbols => {
	        approximately => "~",
	        decimal => ",",
	        exponential => "E",
	        group => ".",
	        infinity => "∞",
	        list => ";",
	        minus => "-",
	        nan => "NaN",
	        per_mille => "‰",
	        percent => "%",
	        plus => "+",
	        superscript => "×",
	        time_separator => ":",
	    },
        number_system => q{latn},
        number_systems => {
	        finance => undef,
	        native => "latn",
	        number_system => "latn",
	        traditional => undef,
	    },
        number_system_digits => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
        prefers_24_hour_time => q{1},
        quarter_format_abbreviated => ["T1", "T2", "T3", "T4"],
        quarter_format_narrow => ["1.er trimestre", "2.º trimestre", "3.er trimestre", "4.º trimestre"],
        quarter_format_wide => ["1.er trimestre", "2.º trimestre", "3.er trimestre", "4.º trimestre"],
        quarter_stand_alone_abbreviated => ["T1", "T2", "T3", "T4"],
        quarter_stand_alone_narrow => ["T1", "T2", "T3", "T4"],
        quarter_stand_alone_wide => ["1.er trimestre", "2.º trimestre", "3.er trimestre", "4.º trimestre"],
        script => undef,
        script_code => undef,
        territory => q{South America},
        territory_code => q{005},
        territory_info => {
	        calendars => undef,
	        contains => undef,
	        currency => "EUR",
	        first_day => 1,
	        gdp => 2242000000000,
	        languages => [qw( es en ca gl eu ast ext an oc )],
	        literacy_percent => 97.7,
	        min_days => 4,
	        parent => "039",
	        population => 47280400,
	        status => "regular",
	        territory => "ES",
	        territory_id => 109,
	        weekend => undef,
	    },
        time_format_allowed => ["H", "h", "hB"],
        time_format_default => q{H:mm:ss},
        time_format_full => q{H:mm:ss (zzzz)},
        time_format_long => q{H:mm:ss z},
        time_format_medium => q{H:mm:ss},
        time_format_preferred => q{H},
        time_format_short => q{H:mm},
        time_formats => {
	        full => "H:mm:ss (zzzz)",
	        long => "H:mm:ss z",
	        medium => "H:mm:ss",
	        short => "H:mm",
	    },
        timezone_format_gmt => q{GMT{0}},
        timezone_format_gmt_zero => q{GMT},
        timezone_format_hour => ["+HH:mm", "-HH:mm"],
        timezone_format_region => q{hora de {0}},
        timezone_format_region_daylight => q{horario de verano de {0}},
        timezone_format_region_standard => q{horario estándar de {0}},

t/01.locale.t  view on Meta::CPAN

	        d => ["d"],
	        default => ["default"],
	        Gy => [qw( G y )],
	        GyM => [qw( G M y )],
	        GyMd => [qw( d G M y )],
	        GyMEd => [qw( d G M y )],
	        GyMMM => [qw( G M y )],
	        GyMMMd => [qw( d G M y )],
	        GyMMMEd => [qw( d G M y )],
	        H => ["H"],
	        h => [qw( a h )],
	        hm => [qw( a h m )],
	        Hm => [qw( H m )],
	        Hmv => [qw( H m )],
	        hmv => [qw( a h m )],
	        hv => [qw( a h )],
	        Hv => ["H"],
	        M => ["M"],
	        Md => [qw( d M )],
	        MEd => [qw( d M )],
	        MMM => ["M"],
	        MMMd => [qw( d M )],
	        MMMEd => [qw( d M )],
	        MMMM => ["M"],
	        y => ["y"],
	        yM => [qw( M y )],
	        yMd => [qw( d M y )],
	        yMEd => [qw( d M y )],
	        yMMM => [qw( M y )],
	        yMMMd => [qw( d M y )],
	        yMMMEd => [qw( d M y )],
	        yMMMM => [qw( M y )],
	    },
        is_ltr => q{0},
        is_rtl => q{1},
        language => q{Japanese},
        language_code => q{ja},
        locale => q{ja-Latn-fonipa-hepburn-heploc},
        locale_number_system => ["latn", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],
        month_format_abbreviated => ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
        month_format_narrow => ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
        month_format_wide => ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
        month_stand_alone_abbreviated => ["M01", "M02", "M03", "M04", "M05", "M06", "M07", "M08", "M09", "M10", "M11", "M12"],
        month_stand_alone_narrow => ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        month_stand_alone_wide => ["M01", "M02", "M03", "M04", "M05", "M06", "M07", "M08", "M09", "M10", "M11", "M12"],
        name => q{Japanese},
        native_language => q{日本語},
        native_name => q{日本語},
        native_script => q{ラテン文字},
        native_territory => undef,
        native_variant => q{国際音声記号},
        native_variants => ["国際音声記号", "ヘボン式ローマ字", ""],
        number_symbols => {
	        approximately => "ç´„",
	        decimal => ".",
	        exponential => "E",
	        group => ",",
	        infinity => "∞",
	        list => ";",
	        minus => "-",
	        nan => "NaN",
	        per_mille => "‰",
	        percent => "%",
	        plus => "+",
	        superscript => "×",
	        time_separator => ":",
	    },
        number_system => q{latn},
        number_systems => {
	        finance => "jpanfin",
	        native => undef,
	        number_system => undef,
	        traditional => "jpan",
	    },
        number_system_digits => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
        prefers_24_hour_time => q{1},
        quarter_format_abbreviated => ["Q1", "Q2", "Q3", "Q4"],
        quarter_format_narrow => ["第1四半期", "第2四半期", "第3四半期", "第4四半期"],
        quarter_format_wide => ["第1四半期", "第2四半期", "第3四半期", "第4四半期"],
        quarter_stand_alone_abbreviated => ["Q1", "Q2", "Q3", "Q4"],
        quarter_stand_alone_narrow => ["Q1", "Q2", "Q3", "Q4"],
        quarter_stand_alone_wide => ["第1四半期", "第2四半期", "第3四半期", "第4四半期"],
        script => q{Latin},
        script_code => q{Latn},
        territory => undef,
        territory_code => undef,
        territory_info => {
	        calendars => [qw( gregorian japanese )],
	        contains => undef,
	        currency => "JPY",
	        first_day => 7,
	        gdp => 5761000000000,
	        languages => [qw( ja ryu ko )],
	        literacy_percent => 99,
	        min_days => undef,
	        parent => "030",
	        population => 123202000,
	        status => "regular",
	        territory => "JP",
	        territory_id => 159,
	        weekend => undef,
	    },
        time_format_allowed => ["H", "K", "h"],
        time_format_default => q{H:mm:ss},
        time_format_full => q{H時mm分ss秒 zzzz},
        time_format_long => q{H:mm:ss z},
        time_format_medium => q{H:mm:ss},
        time_format_preferred => q{H},
        time_format_short => q{H:mm},
        time_formats => {
	        full => "H時mm分ss秒 zzzz",
	        long => "H:mm:ss z",
	        medium => "H:mm:ss",
	        short => "H:mm",
	    },
        timezone_format_gmt => q{GMT{0}},
        timezone_format_gmt_zero => q{GMT},
        timezone_format_hour => ["+HH:mm", "-HH:mm"],
        timezone_format_region => q{{0}時間},
        timezone_format_region_daylight => q{{0}夏時間},
        timezone_format_region_standard => q{{0}標準時},

t/01.locale.t  view on Meta::CPAN

        MMMMd => "M月d日",
        MMMMW => "M月第W週",
        y => "yå¹´",
        yM => "y/M",
        yMd => "y/M/d",
        yMEd => "y/M/d(E)",
        yMEEEEd => "y/M/dEEEE",
        yMM => "y/MM",
        yMMM => "y年M月",
        yMMMd => "y年M月d日",
        yMMMEd => "y年M月d日(E)",
        yMMMEEEEd => "y年M月d日EEEE",
        yMMMM => "y年M月",
        yQQQ => "y/QQQ",
        yQQQQ => "yå¹´QQQQ",
        yw => "Y年第w週",
    },
};

foreach my $def ( @$tests )
{
    my $locale = DateTime::Locale::FromCLDR->new( $def->{locale} );
    subtest $def->{locale} => sub
    {
        SKIP:
        {
            if( !defined( $locale ) )
            {
                diag( "Error instantiating DateTime::Locale::FromCLDR object for locale '$def->{locale}': ", DateTime::Locale::FromCLDR->error );
                skip( DateTime::Locale::FromCLDR->error, 1 );
            }
            foreach my $meth ( sort( keys( %$def ) ) )
            {
                my $ref = $locale->can( $meth );
                if( !$ref )
                {
                    fail( "The method '${meth}' is not supported by DateTime::Locale::FromCLDR" );
                    next;
                }
                my $val = $ref->( $locale );
                if( !defined( $val ) )
                {
                    is( $val, $def->{ $meth }, "${meth} -> undef" );
                }
                elsif( ref( $val ) eq 'HASH' )
                {
                    foreach my $k ( sort( keys( %$val ) ) )
                    {
                        if( ref( $val->{ $k } ) eq 'ARRAY' )
                        {
                            is_deeply( $val->{ $k }, $def->{ $meth }->{ $k }, "${meth} -> ${k} -> '" . ( defined( $def->{ $meth }->{ $k } ) ? join( "', '", @{$def->{ $meth }->{ $k }} ) : 'undef' ) . "'" );
                        }
                        # NOTE: Floating point CLDR values such as territory_info -> literacy_percent
                        # The SQLite driver returns such values as native NVs, and on a perl built with
                        # -Duselongdouble or -Dusequadmath their stringification carries extra precision
                        # digits (for example '97.7000000000000028' instead of '97.7'). A plain string
                        # comparison would therefore fail even though the value is numerically correct, so
                        # genuine fractional numbers are compared numerically within a small tolerance, and
                        # every other value keeps an exact string comparison. We detect a fractional number
                        # with a strict decimal pattern rather than looks_like_number(), because the latter
                        # also accepts 'NaN', 'Inf' and 'Infinity', and the number_symbols hash legitimately
                        # contains a 'nan' symbol whose value is the string 'NaN'.
                        elsif( defined( $val->{ $k } ) &&
                               defined( $def->{ $meth }->{ $k } ) &&
                               $def->{ $meth }->{ $k } =~ /\A[+-]?[0-9]+\.[0-9]+\z/ )
                        {
                            my $got = $val->{ $k };
                            my $exp = $def->{ $meth }->{ $k };
                            ok( Scalar::Util::looks_like_number( $got ) && abs( $got - $exp ) < 1e-6, "${meth} -> ${k} -> '${exp}'" );
                        }
                        else
                        {
                            is( $val->{ $k }, $def->{ $meth }->{ $k }, "${meth} -> ${k} -> '" . ( $def->{ $meth }->{ $k } // 'undef' ) . "'" );
                        }
                    }
                }
                elsif( ref( $val ) eq 'ARRAY' )
                {
                    local $" = ' ';
                    # is( "@$val", "@{$def->{$meth}}", "${meth} -> @{$def->{$meth}}" );
                    unless( is_deeply( $val, $def->{$meth}, "${meth} -> " . dump_array( $def->{$meth} ) ) )
                    {
                        # 
                    }
                }
            }
        };
        foreach my $format ( @{$def->{available_formats}} )
        {
            my $val = $locale->format_for( $format );
            if( !defined( $val ) &&
                $locale->error )
            {
                diag( "Error getting the available format pattern for locale $def->{locale} and format ID '${format}': ", $locale->error );
                fail( $locale->error );
                next;
            }
            is( $val, $available_formats->{ $def->{locale} }->{ $format }, "format_for( ${format} ) -> " . ( $available_formats->{ $def->{locale} }->{ $format } // 'undef' ) );
        }
    };
}

sub dump_array
{
    my $ref = shift( @_ );
    my @parts = ();
    foreach my $this ( @$ref )
    {
        if( ref( $this ) eq 'ARRAY' )
        {
            push( @parts, dump_array( $this ) );
        }
        else
        {
            push( @parts, '"' . $this . '"' );
        }
    }
    return( join( ', ', @parts ) );
}

done_testing();



( run in 1.178 second using v1.01-cache-2.11-cpan-60884a8df76 )