diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-15 22:14:31 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-15 22:14:31 +0000 |
commit | 9ad0568745f6fe01e5fc04f7d23be449d0c377a4 (patch) | |
tree | 3a1dbd9cb1a8f0456fa0cbaadc88bf7f3f7ddaf3 /lib | |
parent | 18b7339f76ca9f2454845b454e0d2168c487e8ee (diff) | |
parent | f9172815abf2357cc8661dd092b8830b9ecd8186 (diff) | |
download | perl-9ad0568745f6fe01e5fc04f7d23be449d0c377a4.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@8140
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/MM_Unix.pm | 4 | ||||
-rw-r--r-- | lib/ExtUtils/Manifest.pm | 4 | ||||
-rw-r--r-- | lib/File/Spec.pm | 2 | ||||
-rw-r--r-- | lib/File/Spec/Functions.pm | 2 | ||||
-rw-r--r-- | lib/File/Spec/Unix.pm | 2 | ||||
-rw-r--r-- | lib/Net/Ping.pm | 5 | ||||
-rw-r--r-- | lib/Tie/SubstrHash.pm | 14 |
7 files changed, 20 insertions, 13 deletions
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index c88f8f7a79..50f10d8a8a 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -7,8 +7,8 @@ use Config; use File::Basename qw(basename dirname fileparse); use DirHandle; use strict; -use vars qw($VERSION $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Dos $Is_PERL_OBJECT - $Verbose %pm %static $Xsubpp_Version); +our ($Is_Mac,$Is_OS2,$Is_VMS,$Is_Win32,$Is_Dos,$Is_PERL_OBJECT, + $Verbose,%pm,%static,$Xsubpp_Version); our $VERSION = '1.12603'; diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index 46ace64e61..030eedffeb 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -8,8 +8,8 @@ use File::Spec::Functions qw(splitpath); use Carp; use strict; -use vars qw($VERSION @ISA @EXPORT_OK - $Is_VMS $Debug $Verbose $Quiet $MANIFEST $found $DEFAULT_MSKIP); +our ($VERSION,@ISA,@EXPORT_OK, + $Is_VMS,$Debug,$Verbose,$Quiet,$MANIFEST,$found,$DEFAULT_MSKIP); $VERSION = substr(q$Revision: 1.33 $, 10); @ISA=('Exporter'); diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm index 3f79d74b66..35707cc780 100644 --- a/lib/File/Spec.pm +++ b/lib/File/Spec.pm @@ -1,7 +1,7 @@ package File::Spec; use strict; -use vars qw(@ISA $VERSION); +our(@ISA, $VERSION); $VERSION = 0.82 ; diff --git a/lib/File/Spec/Functions.pm b/lib/File/Spec/Functions.pm index 0036ac1ded..be653338fa 100644 --- a/lib/File/Spec/Functions.pm +++ b/lib/File/Spec/Functions.pm @@ -3,7 +3,7 @@ package File::Spec::Functions; use File::Spec; use strict; -use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); +our (@ISA,@EXPORT,@EXPORT_OK,%EXPORT_TAGS,$VERSION); $VERSION = '1.1'; diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index a81c533235..4e4cc753aa 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -1,7 +1,7 @@ package File::Spec::Unix; use strict; -use vars qw($VERSION); +our($VERSION); $VERSION = '1.2'; diff --git a/lib/Net/Ping.pm b/lib/Net/Ping.pm index e3006f959f..20a642e0c3 100644 --- a/lib/Net/Ping.pm +++ b/lib/Net/Ping.pm @@ -460,6 +460,11 @@ received from the remote host and the received packet contains the same data as the packet that was sent, the remote host is considered reachable. This protocol does not require any special privileges. +It should be borne in mind that, for both tcp and udp ping, a host +will be reported as unreachable if if not is not running the +appropriate echo service. For Unix-like systems see L<inetd(8)> for +more information. + If the "icmp" protocol is specified, the ping() method sends an icmp echo message to the remote host, which is what the UNIX ping program does. If the echoed message is received from the remote host and diff --git a/lib/Tie/SubstrHash.pm b/lib/Tie/SubstrHash.pm index 3b92bd1cee..afe5d8dc25 100644 --- a/lib/Tie/SubstrHash.pm +++ b/lib/Tie/SubstrHash.pm @@ -186,19 +186,21 @@ sub ceil { sub findgteprime { # find the smallest prime integer greater than or equal to use integer; +# It may be sufficient (and more efficient, IF IT IS CORRECT) to use +# $max = 1 + int sqrt $num and calculate it once only, but is it correct? + my $num = ceil(shift); return 2 if $num <= 2; $num++ unless $num % 2; - my $max = int sqrt $num; - NUM: for (;; $num += 2) { - for ($i = 3; $i <= $max; $i += 2) { - next NUM unless $num % $i; - } - return $num; + my $max = int sqrt $num; + for ($i = 3; $i <= $max; $i += 2) { + next NUM unless $num % $i; + } + return $num; } } |