[Moose-commits] r7668 - Moose/trunk/lib/Moose
doy at code2.0beta.co.uk
doy at code2.0beta.co.uk
Sat Feb 14 01:22:10 GMT 2009
Author: doy
Date: 2009-02-13 17:22:10 -0800 (Fri, 13 Feb 2009)
New Revision: 7668
Modified:
Moose/trunk/lib/Moose/Object.pm
Log:
always call DEMOLISHALL, so that method modifiers work properly on it
Modified: Moose/trunk/lib/Moose/Object.pm
===================================================================
--- Moose/trunk/lib/Moose/Object.pm 2009-02-14 01:10:05 UTC (rev 7667)
+++ Moose/trunk/lib/Moose/Object.pm 2009-02-14 01:22:10 UTC (rev 7668)
@@ -49,16 +49,16 @@
sub DEMOLISHALL {
my $self = shift;
+ # NOTE: we ask Perl if we even
+ # need to do this first, to avoid
+ # extra meta level calls
+ return unless $self->can('DEMOLISH');
foreach my $method ($self->meta->find_all_methods_by_name('DEMOLISH')) {
$method->{code}->execute($self);
}
}
sub DESTROY {
- # NOTE: we ask Perl if we even
- # need to do this first, to avoid
- # extra meta level calls
- return unless $_[0]->can('DEMOLISH');
# if we have an exception here ...
if ($@) {
# localize the $@ ...
More information about the Moose-commits
mailing list