Running "perl Makefile.PL" in the attached Foo module (which includes
Module-Install-0.56) works fine with perl-5.8.8, but with perl-5.9.3 it
dies with the error:
Not a GLOB reference at inc/Module/Install.pm line 91.
BEGIN failed--compilation aborted at Makefile.PL line 3.
The error arises because of the "use constant FOO => 1;" line in
inc/Module/Install/PRIVATE.pm -- removing that line fixes it.
The reason for this is that perl-5.9.3 introduced "proxy constant
subroutines" (see perl593delta.pod) which are not full typeglobs until
they are actually used. In the meantime, they are just SCALAR refs,
hence the "not a GLOB ref" error.
The attached patch fixes the error by eval()'ing the GLOB ref
de-reference: if it isn't a GLOB ref then eval() returns undef and the
item is ignored.
Presumably that's not actually the best idea if the only thing in the
extension being pre-loaded is constants, so you may want a better fix
than this, but it works OK for extensions containing constants and other
methods.