From 609c6d2bf3766b01d36147f32258d7db0258f00c Mon Sep 17 00:00:00 2001 From: doy Date: Mon, 20 Apr 2009 18:49:54 -0500 Subject: convert the metaclass trait to use the new immutable api --- lib/MooseX/NonMoose/Meta/Role/Class.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/MooseX/NonMoose') diff --git a/lib/MooseX/NonMoose/Meta/Role/Class.pm b/lib/MooseX/NonMoose/Meta/Role/Class.pm index a313cb5..73ec958 100644 --- a/lib/MooseX/NonMoose/Meta/Role/Class.pm +++ b/lib/MooseX/NonMoose/Meta/Role/Class.pm @@ -7,7 +7,7 @@ has has_nonmoose_constructor => ( default => 0, ); -around _make_immutable_transformer => sub { +around _immutable_options => sub { my $orig = shift; my $self = shift; @@ -21,8 +21,7 @@ around _make_immutable_transformer => sub { # do nothing if we explicitly ask for the constructor to not be inlined my %args = @_; - return $self->$orig(@_) if exists $args{inline_constructor} - && !$args{inline_constructor}; + return $self->$orig(@_) if !$args{inline_constructor}; # otherwise, explicitly ask for the constructor to be replaced (to suppress # the warning message), since this is the expected usage, and shouldn't -- cgit v1.2.3-54-g00ecf