[Koha-bugs] [Bug 14115] Silence warnings t/Label*

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 22 10:33:37 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14115

--- Comment #3 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Comment on attachment 38907
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38907
[SIGNED-OFF] Bug 14115: Silence warnings in t/Label*

Review of attachment 38907:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14115&attachment=38907)
-----------------------------------------------------------------

::: C4/Labels/Label.pm
@@ +115,5 @@
>      my $csv = Text::CSV_XS->new({allow_whitespace => 1});
>      my $status = $csv->parse($format_string);
>      my @sorted_fields = map {{ 'code' => $_, desc => $_ }} 
> +                        map { $_ && $_ eq 'callnumber' ?
> +                              'itemcallnumber' : $_ } # see bug 5653

I am not against cutting lines, but this should be done to improve the
readability.
Here you didn't, there are 2 map, and 1 is cut after a ?

Perltidy suggests me:

117     my @sorted_fields = map { { 'code' => $_, desc => $_ } }
118       map { $_ && $_ eq 'callnumber' ? 'itemcallnumber' : $_ }    # see bug
5653
119       $csv->fields();

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list