Add plain ~ expansion for Windows system in File::Glob
authorDouglas Christopher Wilson <doug@somethingdoug.com>
Sat, 10 Sep 2011 16:44:18 +0000 (09:44 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 10 Sep 2011 16:45:40 +0000 (09:45 -0700)
commit528bd3ce854c33aaf668dd3aa007a60a4994edac
treef24e1b09cbdc1a4c57c49b9838826184cfdd05a3
parent24abcdac4410a9ebc452ac5b5118b8a4d3f518d5
Add plain ~ expansion for Windows system in File::Glob

Previously in File::Glob, a plain ~ expansion will check
the $HOME environment variable, but that does not normally
exist on Windows systems. There is another variable that
holds the appropriate home path value, which is $USERPROFILE.

This adds a fallback to check $USERPROFILE when $HOME is
not there, the system does not support checking the password
file and the system is DOSISH.
ext/File-Glob/bsd_glob.c
ext/File-Glob/t/basic.t