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);
37 my $method = (caller())[3];
38 my $code = $self->meta->find_next_method_by_name($method);
40 || confess "Could not find the NEXT method for ($method) in ($self)";
41 return $code->($self, @_);
44 sub DESTROY { goto &DEMOLISHALL }
54 Moose::Object - The base object for Moose
68 This will create a new instance and call C<BUILDALL>.
72 This will call every C<BUILD> method in the inheritance hierarchy.
76 This will call every C<DEMOLISH> method in the inheritance hierarchy.
82 All complex software has bugs lurking in it, and this module is no
83 exception. If you find a bug please either email me, or add the bug
88 Stevan Little E<lt>stevan@iinteractive.comE<gt>
90 =head1 COPYRIGHT AND LICENSE
92 Copyright 2006 by Infinity Interactive, Inc.
94 L<http://www.iinteractive.com>
96 This library is free software; you can redistribute it and/or modify
97 it under the same terms as Perl itself.