package MooseX::StrictConstructor::Role::Object;
-use strict;
-use warnings;
-
use Moose::Role;
+use namespace::autoclean;
+
after 'BUILDALL' => sub {
my $self = shift;
my $params = shift;
my %attrs = (
+ __INSTANCE__ => 1,
map { $_ => 1 }
grep {defined}
map { $_->init_arg() } $self->meta()->get_all_attributes()
return;
};
-no Moose::Role;
-
1;
# ABSTRACT: A role which implements a strict constructor for Moose::Object
=head1 SYNOPSIS
- Moose::Util::MetaRole::apply_base_class_roles
- ( for_class => $caller,
- roles =>
- [ 'MooseX::StrictConstructor::Role::Object' ],
- );
+ Moose::Util::MetaRole::apply_base_class_roles(
+ for_class => $caller,
+ roles =>
+ ['MooseX::StrictConstructor::Role::Object'],
+ );
=head1 DESCRIPTION