Re: $ENV HOME on windows
- From: "A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 13:25:39 GMT
anno4000@xxxxxxxxxxxxxxxxxxxxxx wrote in news:59b8c2F2ir6nuU2
@mid.dfncis.de:
Petr Vileta <stoupa@xxxxxxxxxxxxx> wrote in comp.lang.perl.misc:pøíspìvku
"Ilya Zakharevich" <nospam-abuse@xxxxxxxxx> pí?e v diskusním
{HOME}news:f0opmc$27r$1@xxxxxxxxxxxxxxxxxxxxx
What puzzles me deep is why Perl on Windows is not faking $ENV
thisif $ENV{HOMEPATH} and $ENV{HOMEPATH} are both present... I think
One of these should be $ENV{HOMEDRIVE}
would remove at least 10-20% of porting problems...From which hell get you HOME variable? :-)
The suggestion is for Perl to *fake* it in %ENV, deriving the value
from $ENV{HOMEDRIVE} and $ENV{HOMEPATH}. The system environment
doesn't have to have HOME for that.
Which might be a problem for those of us who create a D:\Home and move
users' 'My Documents' folders to directories under D:\Home\<userid> and
add a HOME variable to each user's environment. I am assuming such
problems can be avoided by checking for the existence of of $ENV{HOME}
before faking it. However, this means that the check and the decision as
to whether to fake $ENV{HOME} should not be done at install time but
each time a script is run.
I still do think it is a good idea to fake $ENV{HOME} using
$ENV{HOMEDRIVE} and $ENV{HOMEPATH}.
Sinan
--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
.
- Follow-Ups:
- Re: $ENV HOME on windows
- From: Ilya Zakharevich
- Re: $ENV HOME on windows
- References:
- $ENV HOME on windows
- From: Bob
- Re: $ENV HOME on windows
- From: Dr.Ruud
- Re: $ENV HOME on windows
- From: Ilya Zakharevich
- Re: $ENV HOME on windows
- From: Petr Vileta
- Re: $ENV HOME on windows
- From: anno4000
- $ENV HOME on windows
- Prev by Date: Could not find ParserDetails.ini...
- Next by Date: use one subroutine's variable value in another subroutine inside a module.
- Previous by thread: Re: $ENV HOME on windows
- Next by thread: Re: $ENV HOME on windows
- Index(es):