Geo-Address-Formatter

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN


1.9986 2025-03-26
      - in case with multiple unknown entries in the components, sort them before adding them to the attention
        value to ensure consistency

1.9985 2025-03-24
      - tired of fighting Test::Perl::Critic to get it to install, no longer requiring

1.9984 2025-03-24
      - code clean up, improved performance
      - add Ref::Util::XS as dependency
      - newest address-formatting

1.9983 2024-10-28
      - more tests for abbreviations (one yaml file per language)
      - change regex used in abbreviations

1.9982 2023-06-08
      - no longer use File::Find::Rule to find config files (still used in tests)
      - simplify the logic of reading config files

CHANGES  view on Meta::CPAN

       - newest address-formatting templates

1.83   2020-09-27
       - basic tests for _postformat method
       - hack for now to not deduplicate "new york, new york"
       - newest address-formatting templates

1.82   2020-05-19
       - support for determining correct state_code or county_code
         in multiple languages
       - require Ref::Util, update various other requirements
       - more tests
       - newest address-formatting templates

1.81   2019-02-03
       - require YAML::LibYAML >= 0.81
       - newest address-formatting templates
    
1.80   2019-12-18
       - Text::Hogan 2.03 or higher
       - cleanup of the dist.ini file

META.json  view on Meta::CPAN

         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "Clone" : "0.47",
            "Data::Dumper" : "0",
            "File::Basename" : "0",
            "File::Find::Rule" : "0",
            "Ref::Util" : "0.204",
            "Ref::Util::XS" : "0.117",
            "Scalar::Util" : "0",
            "Text::Hogan" : "2.03",
            "Try::Catch" : "0",
            "YAML::LibYAML" : "v0.904.0",
            "perl" : "5.012"
         }
      },
      "test" : {
         "requires" : {
            "File::Slurper" : "0",

META.yml  view on Meta::CPAN

name: Geo-Address-Formatter
provides:
  Geo::Address::Formatter:
    file: lib/Geo/Address/Formatter.pm
    version: '1.9987'
requires:
  Clone: '0.47'
  Data::Dumper: '0'
  File::Basename: '0'
  File::Find::Rule: '0'
  Ref::Util: '0.204'
  Ref::Util::XS: '0.117'
  Scalar::Util: '0'
  Text::Hogan: '2.03'
  Try::Catch: '0'
  YAML::LibYAML: v0.904.0
  perl: '5.012'
resources:
  homepage: https://github.com/OpenCageData/perl-Geo-Address-Formatter
  repository: https://github.com/OpenCageData/perl-Geo-Address-Formatter.git
version: '1.9987'
x_generated_by_perl: v5.34.1

Makefile.PL  view on Meta::CPAN

  },
  "DISTNAME" => "Geo-Address-Formatter",
  "LICENSE" => "perl",
  "MIN_PERL_VERSION" => "5.012",
  "NAME" => "Geo::Address::Formatter",
  "PREREQ_PM" => {
    "Clone" => "0.47",
    "Data::Dumper" => 0,
    "File::Basename" => 0,
    "File::Find::Rule" => 0,
    "Ref::Util" => "0.204",
    "Ref::Util::XS" => "0.117",
    "Scalar::Util" => 0,
    "Text::Hogan" => "2.03",
    "Try::Catch" => 0,
    "YAML::LibYAML" => "0.904.0"
  },
  "TEST_REQUIRES" => {
    "File::Slurper" => 0,
    "File::Spec" => 0,
    "Test::Exception" => 0,
    "Test::More" => "0.88",

Makefile.PL  view on Meta::CPAN

);


my %FallbackPrereqs = (
  "Clone" => "0.47",
  "Data::Dumper" => 0,
  "File::Basename" => 0,
  "File::Find::Rule" => 0,
  "File::Slurper" => 0,
  "File::Spec" => 0,
  "Ref::Util" => "0.204",
  "Ref::Util::XS" => "0.117",
  "Scalar::Util" => 0,
  "Test::Exception" => 0,
  "Test::More" => "0.88",
  "Test::NoWarnings" => 0,
  "Test::Warn" => 0,
  "Text::Hogan" => "2.03",
  "Try::Catch" => 0,
  "YAML::LibYAML" => "0.904.0"
);

dist.ini  view on Meta::CPAN

author = Ed Freyfogle
license = Perl_5
copyright_holder = Opencage GmbH

[Prereqs / RuntimeRequires]
perl                  = 5.012
Clone                 = >= 0.47
Data::Dumper          = 0
File::Basename        = 0
File::Find::Rule      = 0
Ref::Util             = >= 0.204 ;
Ref::Util::XS         = >= 0.117 ;
Scalar::Util          = 0
Text::Hogan           = >= 2.03 ; 
Try::Catch            = 0
YAML::LibYAML         = >= 0.904.0 ;

[Prereqs / TestRequires]
File::Slurper         = 0
File::Spec            = 0
Test::Exception       = 0
Test::More            = 0.88 ; for done_testing

lib/Geo/Address/Formatter.pm  view on Meta::CPAN

$Geo::Address::Formatter::VERSION = '1.9987';
# ABSTRACT: take structured address data and format it according to the various global/country rules

use strict;
use warnings;
use feature qw(say);
use Clone qw(clone);
use Data::Dumper;
$Data::Dumper::Sortkeys = 1;
use File::Basename qw(dirname);
use Ref::Util qw(is_hashref);
use Scalar::Util qw(looks_like_number);
use Text::Hogan::Compiler;
use Try::Catch;
use YAML::XS qw(LoadFile);
use utf8;

my $THC = Text::Hogan::Compiler->new;

# optional params
my $show_warnings = 1;



( run in 0.296 second using v1.01-cache-2.11-cpan-4d50c553e7e )