Last update on this:
The Win32 core 'forwards' the Win32::GetCwd to the XS module, so
defined(&Win32::GetCwd) returns true but Win32::GetCwd() fails because at that
point in par.pl there is no hook in @INC (and maybe the Win32 isn't extracted
yet anyway).
I think making Win32 one of the 'require_modules' on MSWin is probably the best
approach.
It will save lots of problems for packaged apps that currently call any of the
'forwarded' list below without requiring 'Win32' in the script.
It is also a 1 line change and it works without changing code that could break
something else.
Regds
Mark
+FORWARD(GetCwd)
+FORWARD(SetCwd)
+FORWARD(GetNextAvailDrive)
+FORWARD(GetLastError)
+FORWARD(SetLastError)
+FORWARD(LoginName)
+FORWARD(NodeName)
+FORWARD(DomainName)
+FORWARD(FsType)
+FORWARD(GetOSVersion)
+FORWARD(IsWinNT)
+FORWARD(IsWin95)
+FORWARD(FormatMessage)
+FORWARD(Spawn)
+FORWARD(GetTickCount)
+FORWARD(GetShortPathName)
+FORWARD(GetFullPathName)
+FORWARD(GetLongPathName)
+FORWARD(CopyFile)
+FORWARD(Sleep)
Mark Dootson wrote:
> Yep,
>
> A check of the AS820 diff shows Win32::GetCwd has moved from CORE to the XS
> module.
> I think are going to be stuck with
>
> if { $^O =~ /^MSWin/) { require Win32; }
>
> because Win32::LoginName has moved out of the core too.
>
> Any thoughts?
>
>
>
>
> Mark Dootson wrote:
>> Hi,
>>
>> The failure is in par.pl.
>>
>> It appears that Win32::GetCwd can no longer be called without loading
>> Win32.pm (so it would seem it is no longer CORE).
>>
>> If I add Win32 to the par.pl require_modules sub all is well.
>>
>> Hmmmmm...
>>
>>
>> Eric Wilhelm wrote:
>>> # from Mark Dootson
>>> # on Monday 30 April 2007 01:31 pm:
>>>
>>>> # Instead, it produced :: Can't locate Win32.pm in @INC (@INC
>>>> contains: C:\Perl\build\PAR-Packer-0.973\blib\lib
>>>> C:\Perl\build\PAR-Packer-0.973\contrib \automated_pp_test
>>>> C:\Perl\build\PAR-Packer-0.973\inc
>>>> C:\Perl\build\PAR-Packer-0.973\blib\lib
>>>> C:\Perl\build\PAR-Packer-0.973\blib\arch .) at -e line 8
>>> This appears to be happening during the build. Where is Win32.pm? Is
>>> there a 'perl -I' involved? `pp -e 'use Win32'` ?
>>>
>>> --Eric
>>
>
>