1 package MooseX::StrictConstructor::Role::Object;
8 after 'BUILDALL' => sub {
15 map { $_->init_arg() } $self->meta()->get_all_attributes()
18 my @bad = sort grep { !$attrs{$_} } keys %{$params};
22 "Found unknown attribute(s) init_arg passed to the constructor: @bad";
38 MooseX::StrictConstructor::Role::Object - A role which implements a strict constructor for Moose::Object
42 Moose::Util::MetaRole::apply_base_class_roles
43 ( for_class => $caller,
45 [ 'MooseX::StrictConstructor::Role::Object' ],
50 When you use C<MooseX::StrictConstructor>, your objects will have this
51 role applied to them. It provides a method modifier for C<BUILDALL()>
52 from C<Moose::Object> that implements strict argument checking for
57 Dave Rolsky, C<< <autarch@urth.org> >>
59 =head1 COPYRIGHT & LICENSE
61 Copyright 2007-2008 Dave Rolsky, All Rights Reserved.
63 This program is free software; you can redistribute it and/or modify
64 it under the same terms as Perl itself.