Bug 11185

Summary: check-url-quick.pl fails
Product: Koha Reporter: Frédéric Demians <f.demians>
Component: Command-line UtilitiesAssignee: Frédéric Demians <f.demians>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: gmcharlt, jonathan.druart, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
[SIGNED-OFF] Bug 11185 check-url-quick.pl fails
Bug 11185 check-url-quick.pl fails

Description Frédéric Demians 2013-11-01 09:38:11 UTC
When running check-url-quick.pl, it fails due to AnyEvent::HTTP module bad loading. It comes from this commit:

f88f11b4f805a70c9748bc3676cb1ce086db2ce8
Comment 1 Frédéric Demians 2013-11-01 09:40:31 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-11-14 16:56:03 UTC
The commit in question:

Bug 7963 follow-up: die nicely if AnyEvent libraries not installed

Does this mean that the follow-up on 7963 was wrong, and no follow-up was needed?
Comment 3 Frédéric Demians 2013-11-14 17:00:55 UTC
> Does this mean that the follow-up on 7963 was wrong, and no follow-up
> was needed?

The follow-up was wrong. If the optional dependency AnyEvent::HTTP isn't
installed, a Perl error is displayed in any case.
Comment 4 Owen Leonard 2013-11-14 17:04:57 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2013-11-15 08:34:34 UTC
Frédéric,
Could you explain the goal of this patch please?
I understand what it does, but not why it is useful.
Comment 6 Frédéric Demians 2013-11-15 08:49:03 UTC
> Could you explain the goal of this patch please?
> I understand what it does, but not why it is useful.

Not sure to understand you. If AnyEvent and AnyEvent::HTTP module are
installed, the script execution fails. Long explanation: require
AnyEvent::HTTP <> use AnyEvent::HTTP => the last exports  http_request
subroutine not the first.
Comment 7 Jonathan Druart 2013-11-15 09:32:06 UTC
Ok, I did not see the call to http_request.
Comment 8 Jonathan Druart 2013-11-15 09:32:47 UTC
Created attachment 22955 [details] [review]
Bug 11185 check-url-quick.pl fails

Revert commit f88f11b4f805a70c9748bc3676cb1ce086db2ce8

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Before this patch, check-url-quick.pl fails with an error. After the
patch it runs correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 9 Galen Charlton 2013-11-15 15:32:38 UTC
Pushed to master and 3.14.x.  Thanks, Frédéric!
Comment 10 Tomás Cohen Arazi 2013-12-08 15:07:20 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.

Thanks Frédéric!