Skip to content

Commit

Permalink
refactor: removing unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dipietroR committed Jul 12, 2022
1 parent 515c783 commit 519f7e5
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions cgi/minion_job_status.pl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@

ProductOpener::Display::init();

my $import_files_ref;

my $job_id = param("job_id");

my %data;
Expand Down
1 change: 0 additions & 1 deletion cgi/search.pl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@

my %search_fields_labels = ();
my @tags_fields_options;
my @contains;

push(
@tags_fields_options,
Expand Down
5 changes: 0 additions & 5 deletions lib/ProductOpener/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5206,8 +5206,6 @@ sub search_and_display_products($request_ref, $query_ref, $sort_by, $limit, $pag

for my $product_ref (@{$request_ref->{structured_response}{products}}) {
my $img_url;
my $img_w;
my $img_h;

my $code = $product_ref->{code};
my $img = display_image_thumb($product_ref, 'front');
Expand Down Expand Up @@ -6693,7 +6691,6 @@ sub display_page($request_ref) {

$log->debug("displaying page", { title => $title }) if $log->is_debug();

my $object_ref;
my $type;
my $id;

Expand Down Expand Up @@ -6906,7 +6903,6 @@ sub display_page($request_ref) {
my $image_banner = "";
my $link = lang("donate_link");
my $image;
my $utm;
my @banners = qw(independent personal research);
my $banner = $banners[time() % @banners];
$image = "/images/banners/donate/donate-banner.$banner.$lc.800x150.svg";
Expand Down Expand Up @@ -9268,7 +9264,6 @@ CSS
}
my @columns;
my @extra_row_columns;
my @ecological_impact_columns;

my $extra_row = 0; # Some rows will trigger an extra row (e.g. Salt adds Sodium)

Expand Down
2 changes: 0 additions & 2 deletions lib/ProductOpener/ForestFootprint.pm
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ sub compute_footprints_of_ingredients($$$) {

foreach my $ingredient_ref (@$ingredients_ref) {

my $ingredient_origins_ref;

# If we are at the first level of the ingredients array,
# ingredients have a rank, except the sub-ingredients listed at the end
if ($ingredient_ref->{rank}) {
Expand Down
1 change: 0 additions & 1 deletion lib/ProductOpener/Ingredients.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5243,7 +5243,6 @@ sub extract_ingredients_classes_from_text($) {
}
}

my $with_sweeteners;

my %all_seen = (); # used to not tag "huile végétale" if we have seen "huile de palme" already

Expand Down
1 change: 0 additions & 1 deletion lib/ProductOpener/Tags.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2512,7 +2512,6 @@ sub get_taxonomy_tag_and_link_for_lang($$$) {
my $tagid = shift;

my $tag_lc;
my $tag_url;

if ($tagid =~ /^(\w\w):/) {
$tag_lc = $1;
Expand Down
1 change: 0 additions & 1 deletion scripts/obsolete/import_openfood_ch_name_translations.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,6 @@
#print $json;

my @modified_fields;
my @images_ids;

my $openfood_ref = decode_json($json);
my $openfood_id = $openfood_ref->{data}{id};
Expand Down
2 changes: 0 additions & 2 deletions scripts/run_cloud_vision_ocr.pl
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@

my $cloud_vision_response = $ua->request($request);

my $status;

if ($cloud_vision_response->is_success) {

$log->info("request to google cloud vision was successful") if $log->is_info();
Expand Down
1 change: 0 additions & 1 deletion scripts/tag_stores_magasins_u.pl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
my $modified = 0;

my @modified_fields;
my @images_ids;

my $code = $imported_product_ref->{"EAN PRINCIPAL"};

Expand Down
1 change: 0 additions & 1 deletion t/food.t
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ $product_ref = {};

my $value = "50.1";
my $modifier;
my $unit;
# test we have no modifier
normalize_nutriment_value_and_modifier(\$value, \$modifier);
is($value, "50.1");
Expand Down

0 comments on commit 519f7e5

Please sign in to comment.