use Moose;
has foo => (is => 'rw');
- sub DEMOLISH { }
+ my $i = 0;
+ sub DEMOLISH { $i++ }
__PACKAGE__->meta->make_immutable();
}
{
use Mouse;
has foo => (is => 'rw');
- sub DEMOLISH { }
+ my $i = 0;
+ sub DEMOLISH { $i++ }
__PACKAGE__->meta->make_immutable();
}
{
use base 'Class::Accessor::Fast';
__PACKAGE__->mk_accessors(qw(foo));
- sub DESTROY { }
+ my $i = 0;
+ sub DESTROY { $i++ }
}
use Benchmark qw(cmpthese);