App-LocaleCodesUtils

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

{
   "abstract" : "Utilities related to locale codes",
   "author" : [
      "perlancar <perlancar@cpan.org>"
   ],
   "dynamic_config" : 0,
   "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010",
   "license" : [
      "perl_5"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",

META.yml  view on Meta::CPAN

---
abstract: 'Utilities related to locale codes'
author:
  - 'perlancar <perlancar@cpan.org>'
build_requires:
  File::Spec: '0'
  IO::Handle: '0'
  IPC::Open3: '0'
  Test::More: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 0

Makefile.PL  view on Meta::CPAN

# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030.
use strict;
use warnings;

use 5.010001;

use ExtUtils::MakeMaker;

my %WriteMakefileArgs = (
  "ABSTRACT" => "Utilities related to locale codes",
  "AUTHOR" => "perlancar <perlancar\@cpan.org>",
  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0
  },
  "DISTNAME" => "App-LocaleCodesUtils",
  "EXE_FILES" => [
    "script/country-code2code",
    "script/language-code2code",
    "script/list-countries",
    "script/list-currencies",

README  view on Meta::CPAN

NAME
    App::LocaleCodesUtils - Utilities related to locale codes

VERSION
    This document describes version 0.004 of App::LocaleCodesUtils (from
    Perl distribution App-LocaleCodesUtils), released on 2023-08-06.

DESCRIPTION
    This distributions provides the following command-line utilities:

    *   country-code2code

lib/App/LocaleCodesUtils.pm  view on Meta::CPAN

    } elsif (length($code) == 3) {
        $code2 = Locale::Codes::Language::language_code2code($code, 'alpha-3', 'alpha-2');
    } else {
        return [400, "Please specify alpha-2 or alpha-3 code"];
    }
    return [404, "Unknown or non-unique code '$code'"] unless defined $code2;
    [200, "OK", $code2];
}

1;
# ABSTRACT: Utilities related to locale codes

__END__

=pod

=encoding UTF-8

=head1 NAME

App::LocaleCodesUtils - Utilities related to locale codes

=head1 VERSION

This document describes version 0.004 of App::LocaleCodesUtils (from Perl distribution App-LocaleCodesUtils), released on 2023-08-06.

=head1 DESCRIPTION

This distributions provides the following command-line utilities:

=over



( run in 0.701 second using v1.01-cache-2.11-cpan-ceb78f64989 )