A better way is to simply use https://metacpan.org/pod/File::HomeDir#my_home
.

Please take a look at its implementation:
https://metacpan.org/source/ADAMK/File-HomeDir-1.00/lib/File/HomeDir/Windows.pm#L26

And some background information on doing it under Windows XP or Vista and
later win32 OSes:
http://en.wikipedia.org/wiki/Environment_variable#Default_values

P.S. Sorry for sending this email again. I forgot to CC pdl-devel list :)

Regards,
Ahmad

2015-03-29 19:02 GMT+03:00 Ed <ej...@hotmail.com>:

>   Dear PDL devs,
>
> The top-level Makefile.PL supports using "$ENV{HOME}/.perldl.conf" to load
> config, if it exists. Naturally, that can't work on Win32 because
> $ENV{HOME} is not normally defined.
>
> The problem I perceive here is that especially on Win32, one needs to
> define various *_INC etc in order for PDL to find the funky locations one
> is forced to place various libraries like Proj4. Requiring people to keep
> downloading PDL and editing its perldl.conf is a recipe for errors, like
> the ones Rob saw recently. My vision is that you'll be able to do "cpanm
> PDL", and it will just work in finding your local config, including on
> Win32.
>
> Therefore, I propose that a Win32-compatible equivalent of this be baked
> into PDL proper. One possibility is using "$ENV{USERPROFILE}/.perldl.conf"
> for this? On my machine that is set as "C:\Users\Ed", and I wouldn't mind
> placing a ".perldl.conf" there. What do people think?
>
> Best regards,
> Ed
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> pdl-devel mailing list
> pdl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-devel
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to