An incorrect quote of a metacharacter in a regexp in AuthoritiesMarc.pm causes a compile time warning : Useless use of '\'; doesn't escape metacharacter '(' at /home/cc/kohaclone/C4/AuthoritiesMarc.pm line 856. annoyingly this crops up every time the module is compiled (e.g. in runs of rebuildzebra Let's quote correctly and silence the message
Created attachment 30040 [details] [review] Proposed patch use \Q |E to get perl to quote neta characters To test perl -wc AuthoritiesMarc.pm should no longer complain with the error message in the bug
Created attachment 30262 [details] [review] Bug 12654 Correct incorrectly quoted regexp A compile time warning was being generated because \ does not quote { Replace the plethora of \ before meta and presumed meta characters by \Q \E which gets perl to generate all the necessary escapes, we can assume it knows its regex engine as well or better than the human programmer Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 30312 [details] [review] [PASSED QA] Bug 12654 Correct incorrectly quoted regexp A compile time warning was being generated because \ does not quote { Replace the plethora of \ before meta and presumed meta characters by \Q \E which gets perl to generate all the necessary escapes, we can assume it knows its regex engine as well or better than the human programmer Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Verified change reading the perldoc and also checked that ./misc/link_bibs_to_authorities.pl is no longer showing the warn and still works.
Patch pushed to master. Thanks Colin!
*** Bug 12364 has been marked as a duplicate of this bug. ***