'my $self = shift;',
'return ' . $self->_generate_fallback_destructor('$self'),
'if Scalar::Util::blessed($self) ne \'' . $class . '\';',
+ 'local $?;',
$self->_generate_DEMOLISHALL('$self'),
+ 'return;',
'}',
);
warn join("\n", @source) if $self->options->{debug};
return unless @methods;
return (
- 'local $?;',
'my $igd = Devel::GlobalDestruction::in_global_destruction;',
'Try::Tiny::try {',
(map { $inv . '->' . $_->{class} . '::DEMOLISH($igd);' } @methods),
'no warnings \'misc\';',
'die $_;',
'};',
- 'return;',
);
}