]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
useragent: Raise an exception if the LWP module can't be loaded
authorSimon McVittie <smcv@debian.org>
Sun, 10 Feb 2019 16:29:19 +0000 (16:29 +0000)
committerSimon McVittie <smcv@debian.org>
Tue, 26 Feb 2019 22:57:28 +0000 (22:57 +0000)
Signed-off-by: Simon McVittie <smcv@debian.org>
IkiWiki.pm

index 6aa49229ace4ba23c68267ca942786da445526ac..f916a566db4c65760b3f4203c89095887d27fcf5 100644 (file)
@@ -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