Pointing LWP::UserAgent (and WWW::Mechanize) at a self-signed certificate

If you're using LWP::UserAgent -- and if you're using WWW::Mechanize, you're using it -- you can point it at a self-signed SSL certificate like so:

HTTPS_CA_FILE=/path/to/cacert.pem <script file>