s/class/client/
[Net-HTTPS-Any.git] / lib / Net / HTTPS / Any.pm
index e03c5d7..17faa74 100644 (file)
@@ -43,11 +43,11 @@ BEGIN {
 
 =head1 NAME
 
-Net::HTTPS::Any - Simple HTTPS class using whichever underlying SSL module is available
+Net::HTTPS::Any - Simple HTTPS client using whichever underlying SSL module is available
 
 =cut
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 SYNOPSIS
 
@@ -55,9 +55,9 @@ our $VERSION = '0.10';
   
   ( $page, $response, %reply_headers )
       = https_get(
-                   { 'host' => 'secure.sisd.com',
+                   { 'host' => 'www.fortify.net',
                      'port' => 443,
-                     'path' => '/freeside/index.html',
+                     'path' => '/sslcheck.html',
                      'args' => { 'field' => 'value' },
                      #'args' => [ 'field'=>'value' ], #order preserved
                    },
@@ -65,9 +65,9 @@ our $VERSION = '0.10';
 
   ( $page, $response, %reply_headers )
       = https_post(
-                    'host' => 'secure.sisd.com',
+                    'host' => 'www.google.com',
                     'port' => 443,
-                    'path' => '/freeside/index.html',
+                    'path' => '/accounts/ServiceLoginAuth',
                     'args' => { 'field' => 'value' },
                     #'args' => [ 'field'=>'value' ], #order preserved
                   );
@@ -168,6 +168,8 @@ sub https_get {
 
     if ( $ssl_module eq 'Net::SSLeay' ) {
 
+        no warnings 'uninitialized';
+
         import Net::SSLeay qw(get_https make_headers);
         my $headers = make_headers(%headers);
 
@@ -284,13 +286,13 @@ sub https_post {
 
     if ( $ssl_module eq 'Net::SSLeay' ) {
         
+        no warnings 'uninitialized';
+
         import Net::SSLeay qw(post_https make_headers make_form);
         my $headers = make_headers(%headers);
 
-        if ($opts->{debug}) {
-            no warnings 'uninitialized';
-            $Net::SSLeay::trace = $opts->{debug};
-        }
+        $Net::SSLeay::trace = $opts->{'debug'}
+          if exists $opts->{'debug'} && $opts->{'debug'};
 
         my $raw_data = ref($post_data) ? make_form(%$post_data) : $post_data;