When I look at line 27 in AutoLoader.pm, I find the followingUse of uninitialized value in require at //ms/dist/perl5/PROJ/AutoLoad +er/5.68/lib/perl5/AutoLoader.pm line 27 during global destruction. Use of uninitialized value in require at //ms/dist/perl5/PROJ/AutoLoad +er/5.68/lib/perl5/AutoLoader.pm line 27 during global destruction. Use of uninitialized value in require at //ms/dist/perl5/PROJ/AutoLoad +er/5.68/lib/perl5/AutoLoader.pm line 27 during global destruction. Use of uninitialized value in require at //ms/dist/perl5/PROJ/AutoLoad +er/5.68/lib/perl5/AutoLoader.pm line 27 during global destruction.
when I put a breakpoint in AutoLoader::AUTOLOAD, the missing function seems to be A::DESTROY. So, I tried putting a DESTROY method in A (not sure what code should go in there). This resulted in AutoLoader::AUTOLOAD not getting called, but the error/warning still showing up (this is puzzling). Can anyone help me ? thanks, MichaelAUTOLOAD { my $sub = $AUTOLOAD; my $filename = AutoLoader::find_filename( $sub ); my $save = $@; local $!; # Do not munge the value. eval { local $SIG{__DIE__}; require $filename }; ## line 27!!!! if ($@) { if (substr($sub,-9) eq '::DESTROY') { no strict 'refs'; *$sub = sub {}; $@ = undef; } elsif ($@ =~ /^Can't locate/) { # The load might just have failed because the filename was + too # long for some old SVR3 systems which treat long names as + errors. # If we can successfully truncate a long name then it's wo +rth a go. # There is a slight risk that we could pick up the wrong f +ile here # but autosplit should have warned about that when splitti +ng. if ($filename =~ s/(\w{12,})\.al$/substr($1,0,11).".al"/e) +{ eval { local $SIG{__DIE__}; require $filename }; } } if ($@){ $@ =~ s/ at .*\n//; my $error = $@; require Carp; Carp::croak($error); } } $@ = $save; goto &$sub; }
In reply to AutoLoader destroy issue by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |