diff options
author | doy <doy@tozt.net> | 2009-04-20 18:49:54 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-20 18:49:54 -0500 |
commit | 609c6d2bf3766b01d36147f32258d7db0258f00c (patch) | |
tree | 9e3febc9c8131f50b636065ef0250d60bfec080c /lib | |
parent | 709d4e03b355e694fe8f974104a1b069f0a40156 (diff) | |
download | moosex-nonmoose-609c6d2bf3766b01d36147f32258d7db0258f00c.tar.gz moosex-nonmoose-609c6d2bf3766b01d36147f32258d7db0258f00c.zip |
convert the metaclass trait to use the new immutable api
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MooseX/NonMoose/Meta/Role/Class.pm | 5 |
1 files changed, 2 insertions, 3 deletions
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 |