about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2000-01-12 11:21:29 +0000
committerGraham Barr <gbarr@pobox.com>2000-01-12 11:21:29 +0000
commit4a2765c0b294a598f2f0d3c84682a58c3e79d3fe (patch)
treec31752de4a97309f29e372b77db660950ca04d81
parent2c82d0694627bac1825f5351d0309f608aa2dd76 (diff)
downloadperl-libnet-4a2765c0b294a598f2f0d3c84682a58c3e79d3fe.tar.gz
Net::Time
- Fix use of uninitialized warning caused by _socket

-rw-r--r--Net/Time.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Net/Time.pm b/Net/Time.pm
index 9f2f61d..828babf 100644
--- a/Net/Time.pm
+++ b/Net/Time.pm
@@ -17,7 +17,7 @@ use IO::Select;
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(inet_time inet_daytime);
 
-$VERSION = "2.07";
+$VERSION = "2.08";
 
 $TIMEOUT = 120;
 
@@ -41,8 +41,10 @@ sub _socket
                                           ) and last;
   }
 
+ return unless $me;
+
  $me->send("\n")
-        if(defined $me && $proto eq 'udp');
+        if $proto eq 'udp';
 
  $timeout = $TIMEOUT
         unless defined $timeout;