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: 3.20190228~4 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/e7b0d4a0fff8ed45a90c2efe8ef294bdf7c9bdac?ds=sidebyside 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 90cb96e58..dc047b08a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2470,6 +2470,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