Subject: | Problem of ignoring drive letter on Win32 filesystem. |
When running scripts on Win32 system, that can't start because $prog_dir
have not drive letter.
Subject: | App-Options_driveletter.patch |
*** C:\Perl\\Perl_5_10_0\site\lib\App\Options.pm Sat Feb 16 04:22:02 2008
--- App\Options.pm Wed Feb 27 01:00:28 2008
***************
*** 475,480 ****
--- 475,481 ----
$prog_dir =~ s!\\!/!g; # transform to POSIX-compliant (forward slashes)
$prog_dir =~ s!/$!! if ($prog_dir ne "/"); # remove trailing slash
$prog_dir = "." if ($prog_dir eq "");
+ $prog_dir = $prog_cat.$prog_dir if $^O =~ /MSWin32/ and $prog_dir =~ m!^/! ;
print STDERR "2. Found Directory of Program. catalog=[$prog_cat] dir=[$prog_dir] file=[$prog_file]\n"
if ($debug_options);