This breaks some cycles (notably in anon metaclasses, where it actually
matters).
use warnings;
use Carp 'confess';
-use Scalar::Util 'blessed';
+use Scalar::Util 'blessed', 'weaken';
use constant DEBUG_NO_META => $ENV{DEBUG_NO_META} ? 1 : 0;
sub _generate_meta_method {
my $method_self = shift;
my $metaclass = shift;
+ weaken($metaclass);
+
sub {
# this will be compiled out if the env var wasn't set
if (DEBUG_NO_META) {