raj8 has asked for the wisdom of the Perl Monks concerning the following question:

Monks, I tried to use WWW::Mechanize with HTTPS using 5.8.7 for Win32 with ActiveState, but get error saying that the Crypt::SSLeay module is not installed. However, when searching with PPM I don't even find this available. So the below fails. How would one log in?
use WWW::Mechanize; my $url= 'https://10.64.40.29:8181//login.jsp'; my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->credentials( '10.65.44.29:8181', 'admin', 'admin' => 'password' ); $mech->get( $url ); print $mech->content();

Replies are listed 'Best First'.
Re: WWW::Mechanize with HTTPS
by Herkum (Parson) on Apr 12, 2006 at 03:12 UTC

    When I did a search in ppm this is what I got,

    ppm> s Crypt::SSLeay Searching in Active Repositories 1. Crypt-SSLeay [0.51] OpenSSL glue that provides LWP https support ppm>

    When you doing an install by PPM you have to remember to call the package with the dash instead of double colons. Example,

    ppm> install Crypt-SSLeay

    Note: I thought that Crypt::SSLeay was in the default installation but I was wrong ( at least it isn't for Activestate Perl).

Re: WWW::Mechanize with HTTPS
by monarch (Priest) on Apr 12, 2006 at 03:46 UTC
    If you are using ActiveState 5.8.x try the following:
    ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd

    Note that setting a web proxy is dependant on the method. For HTTPS we set an environment variable:

    $ENV{HTTPS_PROXY} = 'http://proxy.mycompany.com:8080';
    and for HTTP we call the ->proxy method:
    $ua->proxy(['http'],'http://proxy.mycompany.com:8080/');
Re: WWW::Mechanize with HTTPS
by marto (Cardinal) on Apr 12, 2006 at 11:23 UTC
    raj8,

    Please use Super Search before posting a question, this question seems to be asked time and time again.

    Martin