Subject: | "Use of uninitialized value" warning under Windows |
When running perl -Mlocal::lib under Windows, the module behaves correctly (i.e. determines the user's home directory correctly), but a "Use of uninitialized value $user in concatenation or string" warning is thrown. This is caused by $user being undefined in resolve_home_path(), in the line:
File::Glob::bsd_glob("~$user", File::Glob::GLOB_TILDE());
Replacing this with:
File::Glob::bsd_glob("~".($user||""), File::Glob::GLOB_TILDE());
...fixes the warning.
Perl: Strawberry Perl 5.18.2
OS: Windows 7 SP1