rakudo/rakudo — pull request #334 by carbin (2014-11-28 10:22:55+00:00)
Title: prevent uninitialized value warning if user has no home

If a user does not have a home env var rakudo will currently give the warning:

use of uninitialized value %ENV of type Any in string context in any at src/gen/m-ModuleLoader.nqp:363

(this is the line that the core setting is loaded)

A common situation where a user will not have a home is a script being run by a webserver and the webserver user (eg. "www", "www-data") does not have a home, in which case that warning will appear twice in the server error logs every time a perl6 script is invoked.

Contrived situation:

$ unset HOME
$ perl6 -e 'say 1'
use of uninitialized value %ENV of type Any in string context in any at src/gen/m-ModuleLoader.nqp:363

use of uninitialized value %ENV of type Any in string context in any at src/gen/m-ModuleLoader.nqp:363

1