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