Re: $ENV HOME on windows



anno4000@xxxxxxxxxxxxxxxxxxxxxx wrote in news:59b8c2F2ir6nuU2
@mid.dfncis.de:

Petr Vileta <stoupa@xxxxxxxxxxxxx> wrote in comp.lang.perl.misc:
"Ilya Zakharevich" <nospam-abuse@xxxxxxxxx> pí?e v diskusním
pøíspìvku
news:f0opmc$27r$1@xxxxxxxxxxxxxxxxxxxxx
What puzzles me deep is why Perl on Windows is not faking $ENV
{HOME}
if $ENV{HOMEPATH} and $ENV{HOMEPATH} are both present... I think
this

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

.