useragent: Raise an exception if the LWP module can't be loaded
Signed-off-by: Simon McVittie <smcv@debian.org>master
parent
824cf7db1b
commit
e7b0d4a0ff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue