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