about summary refs log tree commit
path: root/Net/Netrc.pm
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2001-09-21 01:52:25 +0000
committerGraham Barr <gbarr@pobox.com>2001-09-21 01:52:25 +0000
commit138f2152fa6e43746c2328f3f0c615c94e9e56dd (patch)
tree319b7644297d12e8825e37f244cc13281cbb8d9e /Net/Netrc.pm
parentf70f615be8703dac7093f7ec28beeda54980d0f9 (diff)
downloadperl-libnet-138f2152fa6e43746c2328f3f0c615c94e9e56dd.tar.gz
Net::Config, Net::Netrc
- Handle $home on w2k

Diffstat (limited to 'Net/Netrc.pm')
-rw-r--r--Net/Netrc.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Net/Netrc.pm b/Net/Netrc.pm
index bbd62ab..bbb3f23 100644
--- a/Net/Netrc.pm
+++ b/Net/Netrc.pm
@@ -11,7 +11,7 @@ use strict;
 use FileHandle;
 use vars qw($VERSION);
 
-$VERSION = "2.11"; # $Id: //depot/libnet/Net/Netrc.pm#10 $
+$VERSION = "2.12"; # $Id: //depot/libnet/Net/Netrc.pm#11 $
 
 my %netrc = ();
 
@@ -27,6 +27,7 @@ sub _readrc
  } else {
    # Some OS's don't have `getpwuid', so we default to $ENV{HOME}
    $home = eval { (getpwuid($>))[7] } || $ENV{HOME};
+   $home ||= $ENV{HOMEDRIVE} . ($ENV{HOMEPATH}||'') if defined $ENV{HOMEDRIVE};
    $file = $home . "/.netrc";
  }
 
@@ -328,6 +329,6 @@ it under the same terms as Perl itself.
 
 =for html <hr>
 
-$Id: //depot/libnet/Net/Netrc.pm#10 $
+$Id: //depot/libnet/Net/Netrc.pm#11 $
 
 =cut