about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2003-05-20 11:50:52 +0000
committerGraham Barr <gbarr@pobox.com>2003-05-20 11:50:52 +0000
commit9f4a0543868553fd45429d1c8a464426d7524bf1 (patch)
tree9fc0a1f9c6e0a05b020394c1d46e76c4a3a3534b
parent6f70ad0c06dd345c397a7a650baf686e374e5a9f (diff)
downloadperl-libnet-9f4a0543868553fd45429d1c8a464426d7524bf1.tar.gz
Net::Domain
- Look in environment on VMS for domainname
  (patch from Michael Cartmell)

-rw-r--r--Net/Domain.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/Net/Domain.pm b/Net/Domain.pm
index b79ec8f..c213ce9 100644
--- a/Net/Domain.pm
+++ b/Net/Domain.pm
@@ -16,7 +16,7 @@ use Net::Config;
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
 
-$VERSION = "2.17"; # $Id: //depot/libnet/Net/Domain.pm#19 $
+$VERSION = "2.18"; # $Id: //depot/libnet/Net/Domain.pm#20 $
 
 my($host,$domain,$fqdn) = (undef,undef,undef);
 
@@ -164,6 +164,11 @@ sub _hostdomain {
                     : undef;
         };
 
+        if ( $^O eq 'VMS' ) {
+            $dom ||= $ENV{'TCPIP$INET_DOMAIN'}
+                 || $ENV{'UCX$INET_DOMAIN'};
+        }
+
         chop($dom = `domainname 2>/dev/null`)
                 unless(defined $dom || $^O =~ /^(?:cygwin|MSWin32)/);
 
@@ -331,6 +336,6 @@ it under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/Domain.pm#19 $>
+I<$Id: //depot/libnet/Net/Domain.pm#20 $>
 
 =cut