Subject: | Uninitialized value in require at .../AutoLoader.pm during global destruction |
While using Module::Autoload I found I would occasionally get errors of
the form:
uninitialized value in require at .../AutoLoader.pm during global
destruction
This mystified me for a bit until I found the following page:
http://www.nntp.perl.org/group/perl.perl5.porters/2007/08/msg127526.html
Having read the above which suggests the uninitialized values come from
having an object in @INC that gets destroyed leaving a 'hole' in @INC I
tried adding the following to Module::AutoINC since it was the only
object in my @INC:
+ END {
+ Module::AutoINC->unimport();
+ };
[See http://rt.cpan.org/Public/Bug/Display.html?id=27760 for the
definition of unimport()]
The above resolved the issue.
Cheers,
Adrian