Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.14 #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Revision history for Data-Validate-Sanctions

{{$NEXT}}

0.14 2022-08-05 03:02:40+00:00 UTC

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing release notes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it was made by dzil automatically when it was released

Copy link

@shantanu-deriv shantanu-deriv Aug 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean you need to add release notes (explain the changes between 0.13 and 0.14)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected the comment :D

evgeniy-deriv marked this conversation as resolved.
Show resolved Hide resolved
Formatted files
0.13 2022-07-26 13:55:00 CST
Improving the search for larger sanction lists

Expand Down
6 changes: 3 additions & 3 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -62,7 +62,7 @@ my %WriteMakefileArgs = (
"Test::Warn" => "0.23",
"Test::Warnings" => "0.026"
},
"VERSION" => "0.13",
"VERSION" => "0.14",
"test" => {
"TESTS" => "t/*.t"
}
Expand All @@ -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,
Expand Down
20 changes: 10 additions & 10 deletions lib/Data/Validate/Sanctions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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};
Expand All @@ -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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the change except formatting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing, just formatting, it was made by dzil automatically when it was released

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the change is just formatting, why was it released?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shantanu-deriv I think you are misunderstanding . Dzil will do perltidy and pump up version number when we run dzil release . we should commit & merge this change after releasing the package to cpan.org
but yes you are right, @evgeniy-deriv should update changes file before he release to cpan.org.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, but now package is released on cpan.org.

Anyway this PR needs to be merged explaining that changes between 0.13 and 0.14 and so far I see only formatting changes between it

$self->{_token_sanctioned_names}->{$token}->{$sanctioned_name} = 1;
}
}

Expand Down