Add $INC{"Config_heavy.pl"} to your debug output

Excellent idea - but it shows that the Config_heavy.pl that has been loaded is the one I expected - the one that contains the debug print(). I inserted $INC{$config_heavy} rather than $INC{"Config_heavy.pl"} just in case $config_heavy had been set to something unexpected. Anyway, here's the output:
D:\>perl -V:useperlio $Config::AUTOLOAD: Config::fetch_string $INC{$config_heavy}: E:/Perl817/lib/Config_heavy.pl $Config::AUTOLOAD: Config::launcher $INC{$config_heavy}: E:/Perl817/lib/Config_heavy.pl $Config::AUTOLOAD: Config::launcher $INC{$config_heavy}: E:/Perl817/lib/Config_heavy.pl &Config::AUTOLOAD failed on Config::launcher at E:/Perl817/lib/Config. +pm line 73.

I also went so far as to insert, immediately after the "require $config_heavy;" in the AUTOLOAD sub the following block of code:
open(RD, "<", $INC{$config_heavy}) or die "Can't open $INC{$config_heavy}: $!"; while(<RD>) {print $_ if $_ =~ /launcher/} close(RD) or die "Can't close $INC{$config_heavy}: $!";

That gives the following output as I expected:
D:\>perl -V:useperlio sub launcher { print "\n\nrunning launcher()\n\n"; $Config::AUTOLOAD: Config::fetch_string $INC{$config_heavy}: E:/Perl817/lib/Config_heavy.pl sub launcher { print "\n\nrunning launcher()\n\n"; $Config::AUTOLOAD: Config::launcher $INC{$config_heavy}: E:/Perl817/lib/Config_heavy.pl sub launcher { print "\n\nrunning launcher()\n\n"; $Config::AUTOLOAD: Config::launcher $INC{$config_heavy}: E:/Perl817/lib/Config_heavy.pl &Config::AUTOLOAD failed on Config::launcher at E:/Perl817/lib/Config. +pm line 77.

I've only just now discovered that if I set $ENV{ACTIVEPERL_CONFIG_DISABLE} then the problem goes away. Of course, I don't really want to do that as I need those ActivePerl::Config values, but it does indicate that it might be a good idea to do a 'diff-u' on the respective ActivePerl::Config.pm files. I'll update this post if that leads to a resolution of this issue.

Anonymous Monk wondered whether the same behaviour occurs when I try the same thing from a script. Yes, it produces the same output.

Cheers,
Rob
UPDATE: In the end, I've simply re-installed build 817 straight over the top of the exisiting install, made my usual couple of changes to Config.pm and ActivePerl/Config.pm, and everything's working fine. I will never know what caused the problem - all I do know is that it wasn't anything in Config.pm, Config_heavy.pl or ActivePerl/Config.pm, as these files are now exactly the same as the files that got overwritten (minus my debug prints). The "usual couple of changes" I make are to set $Config{ld} to 'g++' rather than 'gcc', and to set $Config{lib_ext} to '.a' instead of '.lib'. That's so I can use ActivePerl with the MinGW compiler. It's just those 2 values that need to be amended - the rest are taken care of correctly.

In reply to Re^2: goto grief (@INC) by syphilis
in thread goto grief by syphilis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.