2dab1c3f577e482ce9929e4ea9c8bff59a7ffaeb
[gitmo/Mouse.git] / lib / Mouse / Object.pm
1 package Mouse::Object;
2 use Mouse::Util qw(does dump meta); # enables strict and warnings
3 # all the stuff are defined in XS or PP
4 1;
5 __END__
6
7 =head1 NAME
8
9 Mouse::Object - The base object for Mouse classes
10
11 =head1 VERSION
12
13 This document describes Mouse version 0.87
14
15 =head1 METHODS
16
17 =head2 C<< $class->new(%args | \%args) -> Object >>
18
19 Instantiates a new C<Mouse::Object>. This is obviously intended for subclasses.
20
21 =head2 C<< $class->BUILDARGS(@args) -> HashRef >>
22
23 Lets you override the arguments that C<new> takes.
24 It must return a HashRef of parameters.
25
26 =head2 C<< $object->BUILDALL(\%args) >>
27
28 Calls C<BUILD> on each class in the class hierarchy. This is called at the
29 end of C<new>.
30
31 =head2 C<< $object->BUILD(\%args) >>
32
33 You may put any business logic initialization in BUILD methods. You don't
34 need to redispatch or return any specific value.
35
36 =head2 C<< $object->DEMOLISHALL >>
37
38 Calls C<DEMOLISH> on each class in the class hierarchy. This is called at
39 C<DESTROY> time.
40
41 =head2 C<< $object->DEMOLISH >>
42
43 You may put any business logic deinitialization in DEMOLISH methods. You don't
44 need to redispatch or return any specific value.
45
46 =head2 C<< $object->does($role_name) -> Bool >>
47
48 This will check if the invocant's class B<does> a given C<$role_name>.
49 This is similar to C<isa> for object, but it checks the roles instead.
50
51 =head2 C<< $object->dump($maxdepth) -> Str >>
52
53 This is a handy utility for dumping an object with Data::Dumper.
54 By default, the maximum depth is 3, to avoid making a mess.
55
56 =head2 C<< $object->meta() -> MetaClass >>
57
58 This is a method which provides access to the object's metaclass.
59
60 =head1 SEE ALSO
61
62 L<Moose::Object>
63
64 =cut
65