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

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--- Comment #6 from Jonathan Druart <[email protected]> 
---
(In reply to M. Tompsett from comment #5)
> I only thing that really stood out was the C4/Search.pm
> "Why is the \Q and \E missing?"?
> 
> Explain that, I may sign this off.

This is the whole point of the patch. Have a look at the related bugs, and what
this patch is trying to prevent. If the variable contains a regex character
(like parenthesis in the case of bug 22941, or $ in the case of bug 23006),
then you need to surround your var with \Q\E, see man perlre).

So the patch could have replaced
  grep {/^$var$/} @array
with
  grep {/^\Q$var\E$/} @array

But I preferred the other solution, I am sure you understand why :)

> Everything else is a result of me seeing tcohen wanting to improve
> readability of code. "unless grep" is better read as "if none".

I am not tcohen :)
The patch is a bugfix (updating the status). I would like to prevent other
issues like the ones listed in see also. Replacing them with none, any or
anything else will need more grey matter to make sure the changes will not
introduce a regression. I am not against what you suggest but I think it should
be done separately.

-- 
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]
http://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