No need for copyright_year
[gitmo/MooseX-StrictConstructor.git] / lib / MooseX / StrictConstructor / Trait / Class.pm
index 776953b..579b6c2 100644 (file)
@@ -27,15 +27,17 @@ around '_inline_BUILDALL' => sub {
             'Moose->throw_error("Found unknown attribute(s) passed to the constructor: @bad");',
         '}',
     );
-};
+} if $Moose::VERSION >= 1.9900;
 
 # If the base class role is applied first, and then a superclass is added, we
 # lose the role.
 after superclasses => sub {
     my $self = shift;
-    return if not @_;
+
+    return unless @_;
+
     Moose::Util::MetaRole::apply_base_class_roles(
-        for   => $self->name,
+        for   => $self->name(),
         roles => ['MooseX::StrictConstructor::Role::Object'],
     );
 };