Summary: | Incorrect quoting in regexp in AuthoritiesMarc | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | MARC Authority data support | Assignee: | Colin Campbell <colin.campbell> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | jcamins, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Proposed patch
Bug 12654 Correct incorrectly quoted regexp [PASSED QA] Bug 12654 Correct incorrectly quoted regexp |
Description
Colin Campbell
2014-07-24 16:01:51 UTC
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! |