7 use metaclass 'Moose::Meta::Class' => (
8 ':attribute_metaclass' => 'Moose::Meta::Attribute'
11 our $VERSION = '0.01';
16 my $self = $class->meta->new_object(%params);
17 $self->BUILDALL(%params);
22 my ($self, %params) = @_;
23 foreach my $method ($self->meta->find_all_methods_by_name('BUILD')) {
24 $method->{method}->($self, %params);
30 foreach my $method ($self->meta->find_all_methods_by_name('DEMOLISH')) {
31 $method->{method}->($self);
35 sub DESTROY { goto &DEMOLISHALL }
45 Moose::Object - The base object for Moose
59 This will create a new instance and call C<BUILDALL>.
63 This will call every C<BUILD> method in the inheritance hierarchy.
67 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.