diff --git a/Changes b/Changes index 5ec4bc4..8dc6d5a 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ Revision history for Data-Validate-Sanctions {{$NEXT}} + +0.14 2022-08-05 03:02:40+00:00 UTC + Formatted files 0.13 2022-07-26 13:55:00 CST Improving the search for larger sanction lists diff --git a/Makefile.PL b/Makefile.PL index 902021c..97dd773 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -37,7 +37,7 @@ my %WriteMakefileArgs = ( "Getopt::Long" => "2.42", "IO::Uncompress::Unzip" => 0, "List::Util" => 0, - "Locale::Country" => 0, + "Locale::Country" => "3.66", "Mojo::UserAgent" => 0, "Path::Tiny" => 0, "Scalar::Util" => 0, @@ -62,7 +62,7 @@ my %WriteMakefileArgs = ( "Test::Warn" => "0.23", "Test::Warnings" => "0.026" }, - "VERSION" => "0.13", + "VERSION" => "0.14", "test" => { "TESTS" => "t/*.t" } @@ -85,7 +85,7 @@ my %FallbackPrereqs = ( "IO::Uncompress::Unzip" => 0, "IPC::Open3" => 0, "List::Util" => 0, - "Locale::Country" => 0, + "Locale::Country" => "3.66", "Mojo::UserAgent" => 0, "Path::Tiny" => 0, "Scalar::Util" => 0, diff --git a/lib/Data/Validate/Sanctions.pm b/lib/Data/Validate/Sanctions.pm index 1bed060..0953015 100644 --- a/lib/Data/Validate/Sanctions.pm +++ b/lib/Data/Validate/Sanctions.pm @@ -19,7 +19,7 @@ use List::Util qw(any uniq max min); use Locale::Country; use Text::Trim qw(trim); -our $VERSION = '0.13'; +our $VERSION = '0.14'; my $sanction_file = _default_sanction_file(); my $instance; @@ -219,7 +219,7 @@ sub get_sanctioned_info { ## no critic (RequireArgUnpacking) # and deduplicate the list my $filtered_sanctioned_names = {}; foreach my $token (@client_name_tokens) { - foreach my $name ( keys %{$self->{_token_sanctioned_names}->{$token}}) { + foreach my $name (keys %{$self->{_token_sanctioned_names}->{$token}}) { $filtered_sanctioned_names->{$name} = 1; } } @@ -286,12 +286,12 @@ sub get_sanctioned_info { ## no critic (RequireArgUnpacking) } sub _load_data { - my $self = shift; - my $sanction_file = $self->{sanction_file}; - $self->{last_time} //= 0; - $self->{_data} //= {}; - $self->{_sanctioned_name_tokens} //= {}; - $self->{_token_sanctioned_names} //= {}; + my $self = shift; + my $sanction_file = $self->{sanction_file}; + $self->{last_time} //= 0; + $self->{_data} //= {}; + $self->{_sanctioned_name_tokens} //= {}; + $self->{_token_sanctioned_names} //= {}; if (-e $sanction_file) { return $self->{_data} if stat($sanction_file)->mtime <= $self->{last_time} && $self->{_data}; @@ -303,8 +303,8 @@ sub _load_data { foreach my $sanctioned_name (keys $self->{_index}->%*) { my @tokens = _clean_names($sanctioned_name); $self->{_sanctioned_name_tokens}->{$sanctioned_name} = \@tokens; - foreach my $token (@tokens){ - $self->{_token_sanctioned_names}->{$token}->{$sanctioned_name}=1; + foreach my $token (@tokens) { + $self->{_token_sanctioned_names}->{$token}->{$sanctioned_name} = 1; } }