fix diagnostics to report "our" vs "my" correctly
[p5sagit/p5-mst-13.2.git] / lib / Net / Ping.pm
index 91077dd..5454060 100644 (file)
@@ -4,7 +4,7 @@ package Net::Ping;
 #
 # Authors of the original pingecho():
 #           karrer@bernina.ethz.ch (Andreas Karrer)
-#           pmarquess@bfsec.bt.co.uk (Paul Marquess)
+#           Paul.Marquess@btinternet.com (Paul Marquess)
 #
 # Copyright (c) 1996 Russell Mosemann.  All rights reserved.  This
 # program is free software; you may redistribute it and/or modify it
@@ -106,7 +106,7 @@ sub new
     }
     elsif ($self->{"proto"} eq "icmp")
     {
-        croak("icmp ping requires root privilege") if $>;
+        croak("icmp ping requires root privilege") if ($> and $^O ne 'VMS');
         $self->{"proto_num"} = (getprotobyname('icmp'))[2] ||
                     croak("Can't get icmp protocol by name");
         $self->{"pid"} = $$ & 0xffff;           # Save lower 16 bits of pid