$*HOME blows up if HOME isn't set #5950
If the HOME environment variable is not set (say, as in
$ unset HOME
$ perl6 -e 'put "HOME is $*HOME"'
Curiously, $*TMPDIR is /tmp if the TMPDIR environment variable is not
Maybe that's good and maybe not. But, trying to use homedir blows up the
$ perl6 -e 'homedir( "/Users/brian" ); put "HOME is $*HOME"'
But, homedir isn't documented outside of S16 even though it appears to
$ perl6 -e '$*HOME = "/Users/brian"; put "HOME is $*HOME"'
I can set a key is a completely different variable to get it to work:
$ perl6 -e '%*ENV<HOME> = "/Users/brian"; put "HOME is $*HOME"'
And I can even set it to a directory that does not exist:
$ perl6 -e '%*ENV<HOME> = "/Users/brian/not-there"; put "HOME is $*HOME"'
The $*HOME variable is listed in . If it isn't set, it's documented to
To exit type 'exit' or '^D'
On Fri, 30 Dec 2016 01:06:35 -0800, comdog wrote:
Thank you for the report. All the points in this ticket are now resolved:
- "If HOME env var unset, using $*HOME throws an exception"