Skip Menu |

This queue is for tickets about the podlators CPAN distribution.

Report information
The Basics
Id: 2924
Status: rejected
Priority: 0/
Queue: podlators

People
Owner: RRA [...] cpan.org
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.27
Fixed in: (no value)



Subject: how to properly handle $ENV{HOME} on Win32
use User; my $home = User->Home; User - API for locating user information regardless of OS sub Home { return $ENV{HOME} if $ENV{HOME}; return $ENV{USERPROFILE} if $ENV{USERPROFILE}; return ""; }
I doubt that any Windows user is going to have a .termcap file in their home directory anyway and the fallbacks are fine for Windows, so I think the current solution is fine. I would ask if you agreed, but since no contact information was provided, I don't have much choice other than just closing the ticket....
[RRA - Thu Jul 10 14:11:57 2003]: Show quoted text
> I doubt that any Windows user is going to have a .termcap file in
their Show quoted text
> home directory anyway and the fallbacks are fine for Windows, so I
think Show quoted text
> the current solution is fine.
I disagree. You don't have to use the User module, but I see no reason not to check $ENV{USERPROFILE}.
[guest - Fri Jul 18 02:00:18 2003]: Show quoted text
> I disagree. > You don't have to use the User module, > but I see no reason not to check $ENV{USERPROFILE}.
Do you have an example in mind of a user using Windows for which this would be effective in finding a .termcap file, or is this theoretical? If you have an example in mind of a case where this code would actually be used, I'll add it in the next release.
From: rrwo [...] cpan.org
FYI, use File::HomeDir. The latest version has been updated to work with Win32.
On Sat Feb 11 07:11:07 2006, guest wrote: Show quoted text
> > FYI, use File::HomeDir. The latest version has been updated to work with > Win32.
I'm still not going to do anything about this report unless someone explains a scenario in which it actually does something useful for someone, as mentioned in the previous comment.
This has been open for some time without any further case where a user on Windows added a custom termcap file to their home directory. I don't know what that file would be named on Windows or even if it would make sense, so I don't think just making this change is an improvement. Closing since I don't think there's a bug here. If there's a concrete use case, it can be considered in a separate bug.