in reply to WWW::Mechanize cannot connect to HTTPS site
The classic thing that trips me up when doing this is that I forget to install LWP::Protocol::https. I think the result of $mech->get should return 599 then. For a somewhat verbose output, dump the result of ->get:
use Data::Dumper; print Dumper $mech->get('https://www.cpan.org');
If this fails with a non-599 error, consider cross-checking with wget or curl. If these two cannot connect to the outside world, then outgoing https connections are likely blocked by your network somewhere. If wget or curl work, this means that there is likely an environment variable that tells the two to use a proxy to connect to the outside world. This would likely be a SOCKS proxy, since WWW::Mechanize automatically picks up other proxies from the environment variables HTTP_PROXY or HTTPS_PROXY.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: WWW::Mechanize cannot connect to HTTPS site
by Marshall (Canon) on May 29, 2024 at 09:36 UTC |