summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Dyck <david.dyck@fluke.com>2005-02-15 07:35:45 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-02-15 13:52:15 +0000
commit4852725b6599d1cee72970100a6c19e0adc9b5b7 (patch)
treec88e1552b749a8e7c447a065b429e0e3dcdb1a01
parent646e33b6c26a24d89e6543ab606cb6a803ed6126 (diff)
downloadperl-4852725b6599d1cee72970100a6c19e0adc9b5b7.tar.gz
Fix documentation bug in using Socket's import tags :
Subject: [perl #34141] example in perlbug -f getsockopt incomplete From: David Dyck (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-34141-107730.6.0777451251105@perl.org> p4raw-id: //depot/perl@23971
-rw-r--r--pod/perlfunc.pod8
1 files changed, 4 insertions, 4 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 833e891825..9458d1cccf 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2115,13 +2115,13 @@ integer which you can decode using unpack with the C<i> (or C<I>) format.
An example testing if Nagle's algorithm is turned on on a socket:
- use Socket;
+ use Socket qw(:all);
defined(my $tcp = getprotobyname("tcp"))
or die "Could not determine the protocol number for tcp";
- # my $tcp = Socket::IPPROTO_TCP; # Alternative
- my $packed = getsockopt($socket, $tcp, Socket::TCP_NODELAY)
- or die "Could not query TCP_NODELAY SOCKEt option: $!";
+ # my $tcp = IPPROTO_TCP; # Alternative
+ my $packed = getsockopt($socket, $tcp, TCP_NODELAY)
+ or die "Could not query TCP_NODELAY socket option: $!";
my $nodelay = unpack("I", $packed);
print "Nagle's algorithm is turned ", $nodelay ? "off\n" : "on\n";