On Sun Mar 16 15:00:16 2008, ANDK wrote:
Show quoted text> I have tried several variations under 5.6.2 and 5.5.5 but get no SEGV.
>
> I do get the following from a 5.6.2:
>
> Attempt to free unreferenced scalar at
> /home/src/perl/repoperls/installed-perls/maint-5.6/perl-
> 5.6.2/pVMpUbx/perl-5.6.1@22233/lib/5.6.1/CPAN/HandleConfig.pm
> line 471.
>
> For what it's worth: This noise goes away when I uninstall
> File::HomeDir.
>
The problem also goes away with this diff:
--- lib/CPAN/HandleConfig.pm (Revision 2839)
+++ lib/CPAN/HandleConfig.pm (Arbeitskopie)
@@ -491,7 +491,7 @@
# why one load message pops up even when verbosity is turned off.
# This means File::HomeDir load messages are never seen, but I
# think that's probably OK -- DAGOLDEN
- local $CPAN::Config->{load_module_verbosity} = q[none];
+# local $CPAN::Config->{load_module_verbosity} = q[none];
if ($CPAN::META->has_usable("File::HomeDir")) {
$home = File::HomeDir->my_data;
unless (defined $home) {
And another interesting point: it seems that home() is called
recursively here. If I add a Carp::cluck() here I get:
at /mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm
line 494
CPAN::HandleConfig::home() called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm line 471
CPAN::HandleConfig::require_myconfig_or_config() called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm line 515
CPAN::HandleConfig::load('CPAN::HandleConfig') called at -e line 1
at /mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm
line 494
CPAN::HandleConfig::home() called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm line 471
CPAN::HandleConfig::require_myconfig_or_config() called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm line 515
CPAN::HandleConfig::load('CPAN::HandleConfig') called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN.pm line 3279
CPAN::Shell::optprint('CPAN::Shell', 'load_module', 'CPAN:
File::HomeDir loaded ok (v0.66)^J') called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN.pm line 1441
CPAN::has_inst('CPAN=HASH(0x646720)', 'File::HomeDir', undef)
called at /mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN.pm line 1338
CPAN::has_usable('CPAN=HASH(0x646720)', 'File::HomeDir') called
at /mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm
line 496
CPAN::HandleConfig::home() called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm line 471
CPAN::HandleConfig::require_myconfig_or_config() called at
/mnt/i386/usr/local/src/work/CPAN-svn/blib/lib/CPAN/HandleConfig.pm line 515
CPAN::HandleConfig::load('CPAN::HandleConfig') called at -e line 1
While it still seems to be a perl bug, I wonder if the loading of
HandleConfig while in HandleConfig can cause also other problems and
should be probably avoided?
Regards,
Slaven