Stevan Little > Moose-0.54 > Moose::Object

Download:
Moose-0.54.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  10
Open  39
Stalled  5
View/Report Bugs
Module Version: 0.54   Source   Latest Release: Moose-2.1210

NAME ^

Moose::Object - The base object for Moose

DESCRIPTION ^

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.

You don't actually need to inherit from this in order to use Moose though. It is just here to make life easier.

METHODS ^

meta

This will return the metaclass associated with the given class.

new

This will call BUILDARGS, create a new instance and call BUILDALL.

BUILDARGS

This method processes an argument list into a hash reference. It is used by new.

BUILDALL

This will call every BUILD method in the inheritance hierarchy, and pass it a hash-ref of the the %params passed to new.

DEMOLISHALL

This will call every DEMOLISH method in the inheritance hierarchy.

does ($role_name)

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 ($class_or_role_name)

A Moose Role aware implementation of "DOES" in UNIVERSAL.

DOES is equivalent to isa or does.

dump ($maxdepth)

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.

BUGS ^

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.

AUTHOR ^

Stevan Little <stevan@iinteractive.com>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: