about summary refs log tree commit
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2014-06-02 14:06:57 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2014-06-02 14:06:57 +0100
commitc790f1597de19296c980586c39b388468b1205b2 (patch)
tree93e9fe005c5a4179cf932d985a5a631be505f378
parent470d7b2823bebfd93d530d33fbe504869b3bdb20 (diff)
downloadperl-libnet-c790f1597de19296c980586c39b388468b1205b2.tar.gz
Avoid "Use of uninitialized value $parent in numeric eq (==)" warning when all tests skipped
-rw-r--r--t/pop3_ssl.t4
-rw-r--r--t/smtp_ssl.t4
2 files changed, 6 insertions, 2 deletions
diff --git a/t/pop3_ssl.t b/t/pop3_ssl.t
index eec1730..08ef266 100644
--- a/t/pop3_ssl.t
+++ b/t/pop3_ssl.t
@@ -6,6 +6,8 @@ use Net::POP3;
 
 my $debug = 0; # Net::POP3 Debug => ..
 
+my $parent = 0;
+
 plan skip_all => "no SSL support found in Net::POP3" if ! Net::POP3->can_ssl;
 
 plan skip_all => "fork not supported on this platform"
@@ -32,7 +34,7 @@ my ($fh,$cafile) = tempfile();
 print $fh IO::Socket::SSL::Utils::PEM_cert2string($ca);
 close($fh);
 
-my $parent = $$;
+$parent = $$;
 END { unlink($cafile) if $$ == $parent }
 
 my ($cert) = IO::Socket::SSL::Utils::CERT_create(
diff --git a/t/smtp_ssl.t b/t/smtp_ssl.t
index e4cc918..e7391f3 100644
--- a/t/smtp_ssl.t
+++ b/t/smtp_ssl.t
@@ -6,6 +6,8 @@ use Net::SMTP;
 
 my $debug = 0; # Net::SMTP Debug => ..
 
+my $parent = 0;
+
 plan skip_all => "no SSL support found in Net::SMTP" if ! Net::SMTP->can_ssl;
 
 plan skip_all => "fork not supported on this platform"
@@ -32,7 +34,7 @@ my ($fh,$cafile) = tempfile();
 print $fh IO::Socket::SSL::Utils::PEM_cert2string($ca);
 close($fh);
 
-my $parent = $$;
+$parent = $$;
 END { unlink($cafile) if $$ == $parent }
 
 my ($cert) = IO::Socket::SSL::Utils::CERT_create(