]> 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>
Sun, 24 Feb 2019 18:49:58 +0000 (18:49 +0000)
Signed-off-by: Simon McVittie <smcv@debian.org>
IkiWiki.pm

index 90cb96e5865ba193db122ce42ea7d4cb449bb49f..dc047b08ae55ae085e5b27b2d1a577f0d66d42e2 100644 (file)
@@ -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