1 package MooseX::Object::StrictConstructor;
10 use metaclass 'MooseX::StrictConstructor::Meta::Class';
13 extends 'Moose::Object';
15 after 'BUILDALL' => sub
23 map { $_->init_arg() }
24 $self->meta()->compute_all_applicable_attributes()
27 my @bad = sort grep { ! $attrs{$_} } keys %{ $params };
31 confess "Found unknown attribute(s) init_arg passed to the constructor: @bad";
46 MooseX::Object::StrictConstructor - Implements strict constructors as a Moose::Object subclass
50 This class has no external interface. When you use
51 C<MooseX::StrictConstructor>, your objects will subclass this class
52 rather than Moose::Object.
56 Dave Rolsky, C<< <autarch@urth.org> >>
58 =head1 COPYRIGHT & LICENSE
60 Copyright 2007 Dave Rolsky, All Rights Reserved.
62 This program is free software; you can redistribute it and/or modify
63 it under the same terms as Perl itself.