Moose::Object - The base object for Moose
This serves as the base object for all Moose classes. Every effort will be made to ensure that all classes which use Moose will inherit from this class. It provides a default constructor and destructor, which run all the BUILD and DEMOLISH methods in the class tree.
use Moose
You don't actually need to inherit from this in order to use Moose though. It is just here to make life easier.
This will return the metaclass associated with the given class.
This will create a new instance and call BUILDALL.
BUILDALL
This will call every BUILD method in the inheritance hierarchy, and pass it a hash-ref of the the %params passed to new.
BUILD
%params
new
This will call every DEMOLISH method in the inheritance hierarchy.
DEMOLISH
This will check if the invocant's class does a given $role_name. This is similar to isa for object, but it checks the roles instead.
does
$role_name
isa
Cmon, how many times have you written the following code while debugging:
use Data::Dumper; warn Dumper $obj;
It can get seriously annoying, so why not just use this.
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
Stevan Little <stevan@iinteractive.com>
Copyright 2006-2008 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Moose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Moose
CPAN shell
perl -MCPAN -e shell install Moose
For more information on module installation, please visit the detailed CPAN module installation guide.