This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
On Windows normalize $^X using GetLongPathName()
authorJan Dubois <jand@activestate.com>
Tue, 11 Aug 2009 23:30:32 +0000 (16:30 -0700)
committerJan Dubois <jand@activestate.com>
Tue, 11 Aug 2009 23:42:13 +0000 (16:42 -0700)
commitad2561310d3fa13cf664e8d8b8bb294a23cf9ea4
treec8161a3573c8e6aec189f7a322af18a26d8a6144
parentadbb55c01aa367b564c418e1c4292d5d5711b050
On Windows normalize $^X using GetLongPathName()

If perl.exe is called with a short pathname, then GetModuleFileName()
will return this short name, and $^X will be set to it.  This in turn
is used to initialize @INC to privlib, sitelib and vendorlib locations
relative to $^X, so they too will end up with the mangled short names.

Perl will also automatically add versioned Perl directories in the
same tree if their names start with the same major and minor Perl
version numbers.  This heuristic can be broken when the pathname
components are using short pathnames.  Therefore $^X and @INC should
all be normalized to use the long pathname format.

See also http://rt.cpan.org/Public/Bug/Display.html?id=47890
win32/win32.c