Commit | Line | Data |
---|---|---|
c3398f5b | 1 | package Mouse::Object; |
007481ba | 2 | use Mouse::Util qw(does dump meta); # enables strict and warnings |
6d28c5cf | 3 | |
af04626d | 4 | sub new; |
adb5eb76 | 5 | sub BUILDARGS; |
6 | sub BUILDALL; | |
c3398f5b | 7 | |
adb5eb76 | 8 | sub DESTROY; |
9 | sub DEMOLISHALL; | |
c3398f5b | 10 | |
11 | 1; | |
c3398f5b | 12 | __END__ |
13 | ||
14 | =head1 NAME | |
15 | ||
bedd575c | 16 | Mouse::Object - The base object for Mouse classes |
c3398f5b | 17 | |
a25ca8d6 | 18 | =head1 VERSION |
19 | ||
b0d52f03 | 20 | This document describes Mouse version 0.73 |
a25ca8d6 | 21 | |
c3398f5b | 22 | =head1 METHODS |
23 | ||
31c5194b | 24 | =head2 C<< new (Arguments) -> Object >> |
c3398f5b | 25 | |
1820fffe | 26 | Instantiates a new C<Mouse::Object>. This is obviously intended for subclasses. |
c3398f5b | 27 | |
31c5194b | 28 | =head2 C<< BUILDARGS (Arguments) -> HashRef >> |
c3398f5b | 29 | |
1820fffe | 30 | Lets you override the arguments that C<new> takes. Return a hashref of |
31 | parameters. | |
c3398f5b | 32 | |
31c5194b | 33 | =head2 C<< BUILDALL (\%args) >> |
c3398f5b | 34 | |
1820fffe | 35 | Calls C<BUILD> on each class in the class hierarchy. This is called at the |
36 | end of C<new>. | |
c3398f5b | 37 | |
31c5194b | 38 | =head2 C<< BUILD (\%args) >> |
442125dc | 39 | |
1820fffe | 40 | You may put any business logic initialization in BUILD methods. You don't |
41 | need to redispatch or return any specific value. | |
442125dc | 42 | |
1820fffe | 43 | =head2 C<< DEMOLISHALL >> |
c3398f5b | 44 | |
1820fffe | 45 | Calls C<DEMOLISH> on each class in the class hierarchy. This is called at |
46 | C<DESTROY> time. | |
c3398f5b | 47 | |
1820fffe | 48 | =head2 C<< DEMOLISH >> |
c3398f5b | 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 | ||
df963a63 | 53 | |
1820fffe | 54 | =head2 C<< does ($role_name) -> Bool >> |
56a558f9 | 55 | |
1820fffe | 56 | This will check if the invocant's class B<does> a given C<$role_name>. |
56a558f9 | 57 | This is similar to "isa" for object, but it checks the roles instead. |
58 | ||
f2334e41 | 59 | =head2 C<< dump ($maxdepth) -> Str >> |
df963a63 | 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 | ||
1820fffe | 72 | =head1 SEE ALSO |
73 | ||
74 | L<Moose::Object> | |
c3398f5b | 75 | |
1820fffe | 76 | =cut |
df963a63 | 77 |