Checking in changes prior to tagging of version 0.47. Changelog diff is:
[gitmo/Mouse.git] / lib / Mouse / Object.pm
1 package Mouse::Object;
2 use Mouse::Util qw(does dump meta); # enables strict and warnings
3
4 sub new;
5 sub BUILDARGS;
6 sub BUILDALL;
7
8 sub DESTROY;
9 sub DEMOLISHALL;
10
11 1;
12 __END__
13
14 =head1 NAME
15
16 Mouse::Object - The base object for Mouse classes
17
18 =head1 VERSION
19
20 This document describes Mouse version 0.47
21
22 =head1 METHODS
23
24 =head2 C<< new (Arguments) -> Object >>
25
26 Instantiates a new C<Mouse::Object>. This is obviously intended for subclasses.
27
28 =head2 C<< BUILDARGS (Arguments) -> HashRef >>
29
30 Lets you override the arguments that C<new> takes. Return a hashref of
31 parameters.
32
33 =head2 C<< BUILDALL (\%args) >>
34
35 Calls C<BUILD> on each class in the class hierarchy. This is called at the
36 end of C<new>.
37
38 =head2 C<< BUILD (\%args) >>
39
40 You may put any business logic initialization in BUILD methods. You don't
41 need to redispatch or return any specific value.
42
43 =head2 C<< DEMOLISHALL >>
44
45 Calls C<DEMOLISH> on each class in the class hierarchy. This is called at
46 C<DESTROY> time.
47
48 =head2 C<< DEMOLISH >>
49
50 You may put any business logic deinitialization in DEMOLISH methods. You don't
51 need to redispatch or return any specific value.
52
53
54 =head2 C<< does ($role_name) -> Bool >>
55
56 This will check if the invocant's class B<does> a given C<$role_name>.
57 This is similar to "isa" for object, but it checks the roles instead.
58
59 =head2 C<< dump ($maxdepth) -> Str >>
60
61 From the Moose POD:
62
63     C'mon, how many times have you written the following code while debugging:
64
65      use Data::Dumper; 
66      warn Dumper $obj;
67
68     It can get seriously annoying, so why not just use this.
69
70 The implementation was lifted directly from Moose::Object.
71
72 =head1 SEE ALSO
73
74 L<Moose::Object>
75
76 =cut
77