fix for compat with Moose 1.25
[gitmo/MooseX-StrictConstructor.git] / lib / MooseX / StrictConstructor / Trait / Class.pm
index f4c106a..579b6c2 100644 (file)
@@ -27,7 +27,7 @@ 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.
@@ -37,7 +37,7 @@ after superclasses => sub {
     return unless @_;
 
     Moose::Util::MetaRole::apply_base_class_roles(
-        for   => $self->name,
+        for   => $self->name(),
         roles => ['MooseX::StrictConstructor::Role::Object'],
     );
 };