summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/MooseX/NonMoose/Meta/Role/Class.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MooseX/NonMoose/Meta/Role/Class.pm b/lib/MooseX/NonMoose/Meta/Role/Class.pm
index 6c09b22..b9f9dbb 100644
--- a/lib/MooseX/NonMoose/Meta/Role/Class.pm
+++ b/lib/MooseX/NonMoose/Meta/Role/Class.pm
@@ -57,6 +57,10 @@ sub _determine_constructor_options {
unless $cc_meta->can('does_role')
&& $cc_meta->does_role('MooseX::NonMoose::Meta::Role::Constructor');
+ # do nothing if we explicitly ask for the constructor to not be inlined
+ my %options = @options;
+ return @options if !$options{inline_constructor};
+
# XXX: get constructor name from the constructor metaclass?
my $local_constructor = $self->get_method('new');
if (!defined($local_constructor)) {
@@ -77,10 +81,6 @@ sub _determine_constructor_options {
return @options
if $local_constructor->isa('Class::MOP::Method::Wrapped');
- # do nothing if we explicitly ask for the constructor to not be inlined
- my %options = @options;
- return @options if !$options{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
# cause a warning