Skip to content

Instantly share code, notes, and snippets.

@kgoess
Created June 17, 2014 00:20
Show Gist options
  • Select an option

  • Save kgoess/b4501cb149563d818335 to your computer and use it in GitHub Desktop.

Select an option

Save kgoess/b4501cb149563d818335 to your computer and use it in GitHub Desktop.
package LWPx::Protocol::https_paranoid;
# $Id: https_paranoid.pm 2 2005-06-01 23:12:25Z bradfitz $
use strict;
# Changing Method Resolution Order because the original https inherited
# from http. But now we want to search for methods first in the original
# https, *then* in the new http_paranoid, and only last in the original http.
use mro 'c3';
use vars qw(@ISA);
require LWPx::Protocol::http_paranoid;
require LWP::Protocol::https;
@ISA = qw(
LWP::Protocol::https
LWPx::Protocol::http_paranoid
);
#-----------------------------------------------------------
package LWPx::Protocol::https_paranoid::Socket;
use vars qw(@ISA);
require Net::HTTPS;
@ISA = qw(Net::HTTPS LWPx::Protocol::http_paranoid::SocketMethods);
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment