Subject: | XML::Twig doesn't work in 5.6.1 if Scalar::Util is installed. |
From Twig.pm lines 95..99:
{ local $SIG{__DIE__};
if( eval 'require Scalar::Util') { import Scalar::Util qw(weaken); $weakrefs= 1; }
elsif( eval 'require WeakRef') { import WeakRef; $weakrefs= 1; }
else { $weakrefs= 0; }
}
This won't work in Perl 5.6.1 if you have Scalar::Util installed. The problem is that when you try to import weaken from Scalar::Util, it will Carp::Croak an error message:
"Weak references are not implemented in the version of perl"
After that, the call to 'require WeakRef' never actually happens.