6 use metaclass 'Moose::Meta::Class' => (
7 ':attribute_metaclass' => 'Moose::Meta::Attribute'
10 our $VERSION = '0.02';
13 my ($class, %params) = @_;
14 my $self = $class->meta->new_object(%params);
15 $self->BUILDALL(%params);
20 my ($self, %params) = @_;
21 foreach my $method ($self->meta->find_all_methods_by_name('BUILD')) {
22 $method->{code}->($self, %params);
28 foreach my $method ($self->meta->find_all_methods_by_name('DEMOLISH')) {
29 $method->{code}->($self);
33 sub DESTROY { goto &DEMOLISHALL }
43 Moose::Object - The base object for Moose
57 This will create a new instance and call C<BUILDALL>.
61 This will call every C<BUILD> method in the inheritance hierarchy.
65 This will call every C<DEMOLISH> method in the inheritance hierarchy.
73 All complex software has bugs lurking in it, and this module is no
74 exception. If you find a bug please either email me, or add the bug
79 Stevan Little E<lt>stevan@iinteractive.comE<gt>
81 =head1 COPYRIGHT AND LICENSE
83 Copyright 2006 by Infinity Interactive, Inc.
85 L<http://www.iinteractive.com>
87 This library is free software; you can redistribute it and/or modify
88 it under the same terms as Perl itself.