Bug 20304: (QA follow-up) Remove unwanted 'my'
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 26 Apr 2018 11:48:58 +0000 (13:48 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 3 May 2018 15:47:17 +0000 (12:47 -0300)
'my' creates a new '$value' variable, and prevented the '$value' in
outer scope to be modified

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

cataloguing/additem.pl

index c5d0d43..5cb0809 100755 (executable)
@@ -156,7 +156,7 @@ sub generate_subfield_form {
             my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1);
             my $temp2 = $temp->field($CNtag);
             if ($temp2) {
-                my $value = join ' ', $temp2->subfield($CNsubfield) || q{}, $temp2->subfield($CNsubfield2) || q{};
+                $value = join ' ', $temp2->subfield($CNsubfield) || q{}, $temp2->subfield($CNsubfield2) || q{};
                 #remove any trailing space incase one subfield is used
                 $value =~ s/^\s+|\s+$//g;
             }