[Bug 12654] New: Incorrect quoting in regexp in AuthoritiesMarc
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Bug ID: 12654 Summary: Incorrect quoting in regexp in AuthoritiesMarc Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: MARC Authority data support Assignee: gmcharlt@gmail.com Reporter: colin.campbell@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |colin.campbell@ptfs-europe. | |com --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 30040 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30040&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30040|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30262 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30262&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30262|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30312 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30312&action=edit [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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Colin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12654 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jcamins@cpbibliography.com --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- *** Bug 12364 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org