From dbb9c8198169cf5af16c094d32b06040b09d9f8d Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 17 Sep 2015 15:12:40 -0400 Subject: [PATCH] LP 1496977: Duplicate Code in OpenILS::Application::Cat::AssetCommon It looks like two lines of code got duplicated in commit e2f6cca0 in AssetCommon. This duplication can lead to data loss for the function update_fleshed_copies. It also lead to the following warning when you use OpenILS::Application::Cat::AssetCommon in a script: "my" variable $sc_entries masks earlier declaration in same scope at /usr/local/share/perl/5.18.2/OpenILS/Application/Cat/AssetCommon.pm line 371. After this patch, the warning disappears. Signed-off-by: Jason Stephenson Signed-off-by: Ben Shum --- Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm | 3 --- 1 file changed, 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm index fe0913c7fd..626595ba9b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm @@ -368,9 +368,6 @@ sub update_fleshed_copies { my $sc_entries = $copy->stat_cat_entries; $copy->clear_stat_cat_entries; - my $sc_entries = $copy->stat_cat_entries; - $copy->clear_stat_cat_entries; - my $notes = $copy->notes; $copy->clear_notes; -- 2.11.0