about summary refs log tree commit
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2014-06-02 13:54:53 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2014-06-02 13:54:53 +0100
commit470d7b2823bebfd93d530d33fbe504869b3bdb20 (patch)
treebe356145affe5fda9dfb376e61d84be2fbfa6400
parentf7c3a78a3924018155d6fcf69e1b025f7d2fa389 (diff)
downloadperl-libnet-470d7b2823bebfd93d530d33fbe504869b3bdb20.tar.gz
Avoid "Name "IO::Socket::SSL::SSL_ERROR" used only once: possible typo" warnings
-rw-r--r--t/external/pop3-ssl.t3
-rw-r--r--t/external/smtp-ssl.t3
-rw-r--r--t/pop3_ssl.t1
-rw-r--r--t/smtp_ssl.t1
4 files changed, 8 insertions, 0 deletions
diff --git a/t/external/pop3-ssl.t b/t/external/pop3-ssl.t
index 585890c..6eec93c 100644
--- a/t/external/pop3-ssl.t
+++ b/t/external/pop3-ssl.t
@@ -8,10 +8,13 @@ my $host = 'pop.gmx.net';
 my $debug = 0;
 
 plan skip_all => "no SSL support" if ! Net::POP3->can_ssl;
+{
+no warnings 'once';
 plan skip_all => "no verified SSL connection to $host:995 - $@" if ! eval {
   IO::Socket::SSL->new(PeerAddr => "$host:995", Timeout => 10)
     || die($IO::Socket::SSL::SSL_ERROR||$!);
 };
+}
 
 plan tests => 2;
 
diff --git a/t/external/smtp-ssl.t b/t/external/smtp-ssl.t
index 94753ab..1802976 100644
--- a/t/external/smtp-ssl.t
+++ b/t/external/smtp-ssl.t
@@ -8,10 +8,13 @@ my $host = 'mail.gmx.net';
 my $debug = 0;
 
 plan skip_all => "no SSL support" if ! Net::SMTP->can_ssl;
+{
+no warnings 'once';
 plan skip_all => "no verified SSL connection to $host:465 - $@" if ! eval {
   IO::Socket::SSL->new("$host:465")
     || die($IO::Socket::SSL::SSL_ERROR||$!);
 };
+}
 
 plan tests => 2;
 
diff --git a/t/pop3_ssl.t b/t/pop3_ssl.t
index f1090af..eec1730 100644
--- a/t/pop3_ssl.t
+++ b/t/pop3_ssl.t
@@ -69,6 +69,7 @@ sub pop3_client {
     $cl->quit;
     pass("SSL POP3 connect success");
   } elsif ( ! $cl->starttls ) {
+    no warnings 'once';
     fail("starttls failed: $IO::Socket::SSL::SSL_ERROR");
   } else {
     $cl->quit;
diff --git a/t/smtp_ssl.t b/t/smtp_ssl.t
index afb7bee..e4cc918 100644
--- a/t/smtp_ssl.t
+++ b/t/smtp_ssl.t
@@ -69,6 +69,7 @@ sub smtp_client {
     $cl->quit;
     pass("SSL SMTP connect success");
   } elsif ( ! $cl->starttls ) {
+    no warnings 'once';
     fail("starttls failed: $IO::Socket::SSL::SSL_ERROR");
   } else {
     $cl->quit;