From: Simon McVittie Date: Sun, 10 Feb 2019 16:29:19 +0000 (+0000) Subject: useragent: Raise an exception if the LWP module can't be loaded X-Git-Tag: debian/3.20170111.1~5 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/d9cdf852bc77dfcbe3b4f3cfafbcf8f604e0e58a useragent: Raise an exception if the LWP module can't be loaded Signed-off-by: Simon McVittie --- 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