Subject: | --install_base=~ is not translated to $ENV{HOME} |
perl Build.PL --install_base=~ causes everything to be installed into a subdirectory literally called '~'. Even though this is not technically Module::Build's fault, its the shell, its very surprising and very dangerous as a user will instinctively do "rm -rf ~" and blow away their home directory. I nearly did so.
MakeMaker expands ~ to $ENV{HOME} because of its shell-based nature. Module::Build should do the same with paths coming from the command line. A simple s/^~/$ENV{HOME}/, while it does not exactly emulate what the shell does, is close enough.
The alternative is to issue a warning upon receiving a command line with a ~ at the front, but I feel this is not DWIM. When's the last time you wanted a path with a leading ~?