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