4 use vars qw($VERSION $SSL_SOCKET_CLASS @ISA);
8 # Figure out which SSL implementation to use
9 if ($SSL_SOCKET_CLASS) {
10 # somebody already set it
12 elsif ($Net::SSL::VERSION) {
13 $SSL_SOCKET_CLASS = "Net::SSL";
15 elsif ($IO::Socket::SSL::VERSION) {
16 $SSL_SOCKET_CLASS = "IO::Socket::SSL"; # it was already loaded
19 eval { require Net::SSL; }; # from Crypt-SSLeay
23 require IO::Socket::SSL;
26 $old_errsv =~ s/\s\(\@INC contains:.*\)/)/g;
29 $SSL_SOCKET_CLASS = "IO::Socket::SSL";
32 $SSL_SOCKET_CLASS = "Net::SSL";
36 require Net::HTTP::Methods;
38 @ISA=($SSL_SOCKET_CLASS, 'Net::HTTP::Methods');
42 $self->http_configure($cnf);
47 $self->SUPER::configure($cnf);
50 sub http_default_port {
54 # The underlying SSLeay classes fails to work if the socket is
55 # placed in non-blocking mode. This override of the blocking
56 # method makes sure it stays the way it was created.
57 sub blocking { } # noop