Created
April 17, 2013 17:05
-
-
Save mattdees/5406024 to your computer and use it in GitHub Desktop.
Quick check script for IO::Socket::SSL support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use lib 'lib'; | |
use IO::Socket::SSL; | |
use HTTP::Tiny; | |
use Data::Dumper; | |
my $http = HTTP::Tiny->new(); | |
# yes we all know backticks are terrible, for this test, I *really* didn't care. | |
my $openssl_version = `openssl version`; | |
$openssl_version =~ s/[\n]//; | |
my $http_tiny_branch = `git branch | grep '^*'`; | |
$http_tiny_branch =~ s/\* //; | |
$http_tiny_branch =~ s/\n//; | |
my $os_version = `cat /etc/redhat-release`; | |
print "\n-------------------------------------\n"; | |
print "\t HTTP::Tiny: $http_tiny_branch\n"; | |
print "\t OS Version: $os_version"; | |
print "\t OpenSSL: " . $openssl_version . "\n"; | |
print "\tIO::Socket::SSL: $IO::Socket::SSL::VERSION\n"; | |
print "\n'reason' key from get https://google.com: " . $http->get('https://google.com')->{'reason'} . "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment