aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2019-02-10 16:29:19 +0000
committerSimon McVittie <smcv@debian.org>2019-02-24 18:49:58 +0000
commite7b0d4a0fff8ed45a90c2efe8ef294bdf7c9bdac (patch)
tree88c59b93131682ee847d35b7a7bbca9f5f7f8cd0 /IkiWiki.pm
parent824cf7db1b96a16b080e284bc3ebf90c1f14a203 (diff)
downloadikiwiki-e7b0d4a0fff8ed45a90c2efe8ef294bdf7c9bdac.tar
ikiwiki-e7b0d4a0fff8ed45a90c2efe8ef294bdf7c9bdac.tar.gz
useragent: Raise an exception if the LWP module can't be loaded
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm3
1 files changed, 3 insertions, 0 deletions
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