Nicholas Clark wrote on 2009-09-11:
> On Fri, Sep 11, 2009 at 10:15:21AM +0100, Steve Hay wrote:
>> Nicholas Clark wrote on 2009-09-11:
>> 
>> The full output is
>> 
>> ok 1 - MakeMaker is not yet loaded
>> ok 2 - setup
>> ok 3 - chdir'd to Big-Dummy
>> ok 4 - run(C:\gitclients\perl\t\perl.exe Makefile.PL)
>> ok 5 - run(nmake -nologo)
>> ok 6
>> Attempt to reload Win32.pm aborted.
>> Compilation failed in require at ../../lib/Cwd.pm line 751.
>> BEGIN failed--compilation aborted.
>> END failed--call queue aborted.
>> 1..6
>> # Looks like your test exited with 255 just after 6.
>> 
>> in which the ok 6 is the first test in the END block:
>> 
>>     END {
>>         ok( chdir File::Spec->updir );
>>         ok( teardown_recurs(), 'teardown' );
>>     }
>> 
>> so it blows up doing the teardown_recurs() test. That's in
>> MakeMaker\Test\Setup\BFD.pm and calls rmtree() on various
directories.
>> rmtree() calls getcwd(), and that's where it blows up.
>> 
>> I'm confused about the
>> 
>> delete $DynaLoader::{boot_DynaLoader}
>> 
>> line in NoXS.pm. It has no effect on the
>> 
>> if (defined &DynaLoader::boot_DynaLoader) {
> 
> I think that the optree its own reference to the subroutine, so
> deleting it
> from the symbol table isn't going to make a difference.
> 
> On Unix (so the quoting style won't work for you, sorry), I see:
> 
> $ perl -lwe 'print defined  &DynaLoader::boot_DynaLoader' 1 $ perl
-lwe
> 'delete $DynaLoader::{boot_DynaLoader}; print defined
> &DynaLoader::boot_DynaLoader' 1
> 
> but
> 
> $ perl -lwe 'BEGIN {delete $DynaLoader::{boot_DynaLoader}}; print
> defined  &DynaLoader::boot_DynaLoader'
> 
> $ perl -lwe 'delete $DynaLoader::{boot_DynaLoader}; print eval
> q{defined  &DynaLoader::boot_DynaLoader}'

Yes, I get the same here.


> 
> 
>> line in Cwd.pm, i.e. the above test is true, even immediately after
the
>> delete. Changing the delete line to
>> 
>> delete $DynaLoader{boot_DynaLoader}
>> 
>> makes the test in Cwd.pm return false,

Sorry, I don't think that was actually true. I may have got confused
somewhere...


>> but doesn't stop the test script
>> from blowing up just the same. But changing Cwd.pm line 751 to
>> 
>> if (0) {
>> 
>> does fix it.
> 
> So does
> 
>    if (eval 'defined &DynaLoader::boot_DynaLoader') {
> 
> fix it?

Yes, that fixes it.

Reply via email to