Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: Should File::HomeDir honor $ENV{HOME} on Darwin?

by xdg (Monsignor)
on Dec 18, 2008 at 20:50 UTC ( #731388=note: print w/ replies, xml ) Need Help??

in reply to Re: Should File::HomeDir honor $ENV{HOME} on Darwin?
in thread Should File::HomeDir honor $ENV{HOME} on Darwin?

Honestly, I'm not convinced $ENV{HOME} should be used on any platform...

If it weren't there already for Unix and Win32 (and MacOS9), I probably wouldn't advocate for it.

The situation that got me was actually in testing. I'm using a module that uses File::HomeDir to find a config file and I wanted to substitute a new config file in a temporary directory. My quick and dirty approach was just to set $ENV{HOME} to the temporary directory, which turned out to work everywhere except Darwin.

Instead, I'll probably now mock File::HomeDir and override my_home to return the temporary directory.


Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Comment on Re^2: Should File::HomeDir honor $ENV{HOME} on Darwin?
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://731388]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2015-11-29 01:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls