Created attachment 3122 [details] [review] Modified the merge subroutine in AuthoritiesMarc.pm so it won't destroy the connection to the biblioserver. When trying to use the script "./merge_authority.pl -b" to merge all authorities, an error is returned. Here is an example using the verbose mode : $ ./merge_authority.pl -b -v Merging managing 76871 managing 14291 {_conn} undefined: has this Connection been destroy()ed? at /usr/lib/perl5/ZOOM.pm line 341. The problem seems to happen because the ZOOM connection to the biblioserver is destroyed on line 1305 of AuthoritiesMarc.pm. The merge is done correctly for the first authority, but an error is returned when we get to the second one because the connection was destroyed by the first call to &merge. There seems to be no way to check if a connection was destroyed, so I modified the &merge subroutine so it won't destroy the connection, but will return it to its original state after &merge is done with it. Patch attached.
Created attachment 4771 [details] [review] Bug 5737: Modified the merge subroutine in AuthoritiesMarc.pm so it won't destroy the connection to the biblioserver. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Patch just introduces a new variable to store a value which is redefined in the next line. Patch then applies the old value before exiting the subroutine. Clean, easy to read, marking as Passed QA.
Pushed, please test