From d9cdf852bc77dfcbe3b4f3cfafbcf8f604e0e58a Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Sun, 10 Feb 2019 16:29:19 +0000
Subject: [PATCH] useragent: Raise an exception if the LWP module can't be
 loaded

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 IkiWiki.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/IkiWiki.pm b/IkiWiki.pm
index 6aa49229a..f916a566d 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -2448,6 +2448,9 @@ sub add_autofile ($$$) {
 }
 
 sub useragent () {
+	eval q{use LWP};
+	error($@) if $@;
+
 	return LWP::UserAgent->new(
 		cookie_jar => $config{cookiejar},
 		env_proxy => 1,		# respect proxy env vars
-- 
2.39.5