in reply to Devel::CheckLib problem

FWIW, I can reproduce the problem with Config.pm outside of Devel::CheckLib.pm:

C:\test>perl -MConfig -E"say for @Config{ qw[ccflags ldflags] }" &Config::AUTOLOAD failed on Config::launcher at C:/Perl64/lib/Config.p +m line 76. BEGIN failed--compilation aborted at C:/Perl64/lib/ActivePerl/Config.p +m line 4. Compilation failed in require at C:/Perl64/lib/Config_heavy.pl line 11 +. BEGIN failed--compilation aborted at C:/Perl64/lib/Config_heavy.pl lin +e 15. Compilation failed in require at C:/Perl64/lib/Config.pm line 74. C:\test>perl -MConfig -E"say @Config{ qw[ccflags ldflags ]}" -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DWIN32 -D_CONSOL +E -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DUSE_SITECUST +OMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_S +YS -DUSE_PERLIO -DPERL_MSVCRT_READFIX-nologo -nodefaultlib -debug -op +t:ref,icf -ltcg -libpath:"C:\Perl64\lib\CORE" -machine:AMD64

But I've still no real idea why that happens.

My best guess is that %Config is some kind of tied or magic-applied hash and it doesn't like having its elements aliased.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Devel::CheckLib problem
by syphilis (Archbishop) on Dec 09, 2010 at 14:43 UTC
    My best guess is that %Config is some kind of tied or magic-applied hash and it doesn't like having its elements aliased

    Yes, in order for MinGW to work with ActivePerl, it's necessary to override a number of %Config values. They do this with something along the lines of:
    my $obj = tied %Config::Config; if(mingw_detected) { $obj->{cc} = 'gcc'; $obj->{make} = 'dmake'; .... }
    I still don't get how the presence (and loading) of an empty blib can make a difference to the loading of Devel::CheckLib ... though it's probably not as important as I first thought.

    I'll see how I go with what you've come up with already. Thanks !

    Cheers,
    Rob