From 511283bfd221a1f914dbb514b73d0e74cb8e8aea Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 2 Oct 2012 16:55:32 +0200 Subject: [PATCH] Bug 7963 follow-up: die nicely if AnyEvent libraries not installed --- misc/cronjobs/check-url-quick.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/check-url-quick.pl b/misc/cronjobs/check-url-quick.pl index 632a1fe..d1674e8 100755 --- a/misc/cronjobs/check-url-quick.pl +++ b/misc/cronjobs/check-url-quick.pl @@ -22,8 +22,8 @@ use Pod::Usage; use Getopt::Long; use C4::Context; use C4::Biblio; -use AnyEvent; -use AnyEvent::HTTP; +eval { require AnyEvent } or die "This script requires AnyEvent perl library. Use check-url.pl if you can't install AnyEvent" ; +eval { require AnyEvent::HTTP } or die "This script requires AnyEvent::HTTP perl library. Use check-url.pl if you can't install AnyEvent::HTTP" ; my ( $verbose, $help, $html ) = ( 0, 0, 0 ); my ( $host, $host_intranet ) = ( '', '' ); -- 1.7.9.5