summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-09-27 19:18:54 -0500
committerJesse Luehrs <doy@tozt.net>2009-09-27 19:29:18 -0500
commitbaf7ee288431082b6c347fda4de56e7dfde691d8 (patch)
tree1b4d584ee885391f9e7ab863a02cefd852221f45 /lib
parentfc90be41451cb04f49abf540cca6fa2f64bac89c (diff)
downloadmoosex-nonmoose-baf7ee288431082b6c347fda4de56e7dfde691d8.tar.gz
moosex-nonmoose-baf7ee288431082b6c347fda4de56e7dfde691d8.zip
actually, let's hold off on inlined destructors
Diffstat (limited to 'lib')
-rw-r--r--lib/MooseX/NonMoose/Meta/Role/Class.pm21
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/MooseX/NonMoose/Meta/Role/Class.pm b/lib/MooseX/NonMoose/Meta/Role/Class.pm
index f33e89f..e1a5fa9 100644
--- a/lib/MooseX/NonMoose/Meta/Role/Class.pm
+++ b/lib/MooseX/NonMoose/Meta/Role/Class.pm
@@ -83,21 +83,7 @@ sub _determine_destructor_options {
my $self = shift;
my @options = @_;
- # if we're using just the metaclass trait, but not the destructor trait,
- # then suppress the warning about not inlining a destructor
- my $dc_meta = Class::MOP::class_of($self->destructor_class);
- return (@options, inline_destructor => 0)
- unless $dc_meta->can('does_role')
- && $dc_meta->does_role('MooseX::NonMoose::Meta::Role::Destructor');
-
- # do nothing if we explicitly ask for the destructor to not be inlined
- my %options = @options;
- return @options if !$options{inline_destructor};
-
- # otherwise, explicitly ask for the destructor to be replaced (to suppress
- # the warning message), since this is the expected usage, and shouldn't
- # cause a warning
- return (replace_destructor => 1, @options);
+ return (@options, inline_destructor => 0);
}
around _immutable_options => sub {
@@ -187,11 +173,6 @@ sub _check_superclass_destructor {
$super_DESTROY->associated_metaclass->destructor_class
);
- # if the destructor we're inheriting is already one of ours, there's
- # no reason to install a new one
- return if $destructor_class_meta->can('does_role')
- && $destructor_class_meta->does_role('MooseX::NonMoose::Meta::Role::Destructor');
-
# if the destructor we're inheriting is an inlined version of the
# default moose destructor, don't do anything
return if any { $_->isa($destructor_class_meta->name) }