Skip to content

Commit

Permalink
refactor: split huge function in Imports.pm in smaller huge functions (
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet committed Feb 16, 2023
1 parent 185323a commit 3fb4a6d
Show file tree
Hide file tree
Showing 20 changed files with 2,645 additions and 760 deletions.
2 changes: 1 addition & 1 deletion lib/ProductOpener/GS1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ sub convert_gs1_json_message_to_off_products_csv ($json_ref, $products_ref, $mes

# assign the lang and lc fields
if (defined $product_ref->{languages}) {
my @sorted_languages = sort ({$product_ref->{languages}{$b} <=> $product_ref->{languages}{$a}}
my @sorted_languages = sort({$product_ref->{languages}{$b} <=> $product_ref->{languages}{$a}}
keys %{$product_ref->{languages}});
my $top_language = $sorted_languages[0];
$product_ref->{lc} = $top_language;
Expand Down
Loading

0 comments on commit 3fb4a6d

Please sign in to comment.