Subject: | Net::Netrc assumes ".netrc", should also look for '_netrc' for PC compatibility |
Net::netrc assumes a file called /netrc, yet on PCs the file needs to be
called _netrc. modifying the first section of the script along the
lines below is one route that would fix this. there are probably others
as well.
if ($^O eq "MacOS") {
$home = $ENV{HOME} || `pwd`;
chomp($home);
$file = ($home =~ /:$/ ? $home . "netrc" : $home . ":netrc");
}
elsif ($^O eq "MSWin32") {
$home = $ENV{USERPROFILE};
$file = $home . "\_lkpass";
}
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";
}