We have a lot of these things like "my $var .= ...", what is shouldn't be (if no var before "my" so why conditional assignments?) - this looks like refactoring remnants since old times, here I found some to analyze (and fix): C4/Circulation.pm: 859: my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 }); C4/Message.pm: 165: my $format ||= sub { $_[0] || "" }; C4/Search.pm: 891: my $weighted_query .= "(rk=("; # Specifies that we're applying rank C4/Utils/DataTables/VirtualShelves.pm: 47: my $join_vs .= q| circ/circulation.pl: 477: my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 }); Koha/DateUtils.pm: 146: my $time_re .= qr| t/Labels_split_ccn.t: 41: my $split_num += scalar(@{$ccns->{$_}}); t/Labels_split_ddcn.t: 40: my $split_num += scalar(@{$ddcns->{$_}}); t/Labels_split_lccn.t: 43: my $split_num += scalar(@{$lccns->{$_}}); t/db_dependent/SIP/Message.t: 127: my $resp .= C4::SIP::Sip::maybe_add( FID_CALL_NUMBER, $sip_item->hold_patron_name, $server ); 840: my $resp .= C4::SIP::Sip::maybe_add( FID_CALL_NUMBER, $sip_item->hold_patron_bcode, $server );
Created attachment 130937 [details] [review] Bug 30110: Fix concatenation during assignements There are several occurrences of `my $var += ` or .= in the code. It should not cause problems but it's confusing. Test plan: Read the patch and confirm that the changes make sense.
Surely a lot of copy/paste errors. Looks good to me.
Created attachment 132043 [details] [review] Bug 30110: Fix concatenation during assignements There are several occurrences of `my $var += ` or .= in the code. It should not cause problems but it's confusing. Test plan: Read the patch and confirm that the changes make sense. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 132188 [details] [review] Bug 30110: Fix concatenation during assignements There are several occurrences of `my $var += ` or .= in the code. It should not cause problems but it's confusing. Test plan: Read the patch and confirm that the changes make sense. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Funky.. nice bit of clean up, no regressions found. PQA
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.05