and use File::Spec to do the concat.
(Come to think of it, couldn't File::Spec provide
for a ->homedir method?)
p4raw-id: //depot/perl@10962
}
}
if ($< == $> and !$CONFIGURE) {
- my $home = eval { (getpwuid($>))[7] } || $ENV{HOME};
- $file = $home . "/.libnetrc";
+ use File::Spec;
+ my $home = eval { (getpwuid($>))[7] } || $ENV{HOME} || $ENV{HOMEDRIVE} || $ENV{HOMEPATH} || File::Spec->curdir;
+ $file = File::Spec->catfile($home, ".libnetrc");
$ref = eval { do $file } if -f $file;
%NetConfig = (%NetConfig, %{ $ref })
if ref($ref) eq 'HASH';