https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30110

            Bug ID: 30110
           Summary: Potential bug source: plenty of "my" declarations with
                    conditional assignments
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

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 );

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to