Hi,
On win32, build 817 (perl 5.8.8) of ActivePerl my 'perl -V:xxxx' commands have decided to stop working.Here's an example:
D:\>perl -V:useperlio
&Config::AUTOLOAD failed on Config::launcher at E:/Perl817/lib/Config.
+pm line 72.
I traced the problem back to the AUTOLOAD subroutine in Config.pm. For debugging, I inserted a print() into that sub. It now looks like this:
sub AUTOLOAD {
my $config_heavy = 'Config_heavy.pl';
if (defined &ActivePerl::_CONFIG_HEAVY) {
$config_heavy = ActivePerl::_CONFIG_HEAVY();
}
require $config_heavy;
print "\$Config::AUTOLOAD: $Config::AUTOLOAD\n"; # inserted by syp
+hilis
goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; # line 73, wa
+s line 72
}
(ActivePerl::_CONFIG_HEAVY is not defined.)
Apart from the print(), the AUTOLOAD sub is unchanged.
I noted that Config_heavy.pl's launcher() subroutine gets called if $Config::AUTOLOAD does not match /launcher$/. I also inserted a print() into that subroutine. It now looks like this:
sub launcher {
print "\n\nrunning launcher()\n\n"; # inserted by syphilis
undef &AUTOLOAD;
goto \&$Config::AUTOLOAD;
}
Again, apart from the print(), that sub is unchanged.
Now when I run the same command, I get:
D:\>perl -V:useperlio
$Config::AUTOLOAD: Config::fetch_string
$Config::AUTOLOAD: Config::launcher
$Config::AUTOLOAD: Config::launcher
&Config::AUTOLOAD failed on Config::launcher at E:/Perl817/lib/Config.
+pm line 73.
So ... the first time AUTOLOAD gets called, $Config::AUTOLOAD equates to "Config::fetch_string", yet, as you can see from the fact that "running launcher" has not been printed out, Config_heavy.pl's launcher() sub routine has not been run. How can that possibly be ?
I thought, perhaps, there's another launcher() sub/sunction that got found, but a search of my entire perl installation for the string "launcher" did not turn up such a sub/function - except for the one specified in Config_heavy.pl.
On a separate computer (a laptop) I have the very same build of perl. Running a 'diff -u' on the respective Config.pm and Config_heavy.pl files reveals that they are the same on both the laptop and the (broken) desktop. Yet, on the laptop, everything works correctly, and as expected. That is, I get (using the same debug print statements):
D:\>perl -V:useperlio
$Config::AUTOLOAD: Config::fetch_string
running launcher
useperlio='define';
Further to that, I can reproduce the error on the laptop if I comment out the require() in the AUTOLOAD subroutine. I feel that getting launcher() to run is crucial to getting things working again - but I can't for the life of me see why it doesn't get run, or what further steps I can take to troubleshoot this. It's a tall order to expect someone to be able to solve this for me, on the evidence I've provided - but any thoughts on what I can do to reach an understanding of what's screwed up are definitely appreciated.
Anyone been bitten by anything remotely like this ? It used to be ok ... hard to say exactly when it broke, but it was ok a month or so ago.
Other than that, I'll just have to re-install ... which will either fix the problem or make no difference at all. Either way, I'll be none the wiser.
Cheers,
Rob