An easier fix is
bless(\sub {}, 'Foo'); [download]
In reply to Re^2: No DESTROY object. by gam3 in thread No DESTROY object. by gam3