Hi, I have been trying to use this with the following code and result. I have tried forcing different versions of TLS and ignoring the server certificate. I have version 2.00 of the WWW-Mechanize module installed. The site itself supports TLS 1.1 and 1.2 I can wget to https://customer.bookingbug.com from the same machine that I'm trying this perl script from. Can anybody help please?
#!/usr/bin/perl use constant VERSION => "v1.06"; use strict; use warnings; use IO::Socket::SSL; use LWP; use LWP::UserAgent; use LWP::Debug; use WWW::Mechanize; LWP::Debug::trace('()'); $| = 1; # perform flush after each write to STDOUT my $url="https://customer.bookingbug.com"; my $initial_user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_ +3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534 +.53.10'; my $mech; $mech=WWW::Mechanize->new( agent => $initial_user_agent, ); $mech->add_handler("request_send", sub { shift->dump; return }); $mech->get( $url ); printf($mech->content)
This is the result I get:
./s.pl GET https://customer.bookingbug.com Accept-Encoding: gzip User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit +/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10 (no content) Error GETing https://customer.bookingbug.com: Can't connect to custome +r.bookingbug.com:443 (LWP::Protocol::https::Socket: SSL connect attem +pt failed with unknown errorerror:140770FC:SSL routines:SSL23_GET_SER +VER_HELLO:unknown protocol) at ./s.pl line 35.

In reply to Unable to use WWW-Mechanize by rich_d_thomas

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.