2 package Class::MOP::Object;
7 use Scalar::Util 'blessed';
10 $VERSION = eval $VERSION;
11 our $AUTHORITY = 'cpan:STEVAN';
16 require Class::MOP::Class;
17 Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
21 Class::MOP::class_of(shift)->new_object(@_);
25 # Cmon, how many times have you written
26 # the following code while debugging:
31 # It can get seriously annoying, so why
32 # not just do this ...
36 local $Data::Dumper::Maxdepth = shift || 1;
37 Data::Dumper::Dumper $self;
48 Class::MOP::Object - Base class for metaclasses
52 This class is a very minimal base class for metaclasses.
56 This class provides a few methods which are useful in all metaclasses.
60 =item B<< Class::MOP::???->meta >>
62 This returns a L<Class::MOP::Class> object.
64 =item B<< $metaobject->dump($max_depth) >>
66 This method uses L<Data::Dumper> to dump the object. You can pass an
67 optional maximum depth, which will set C<$Data::Dumper::Maxdepth>. The
68 default maximum depth is 1.
74 Stevan Little E<lt>stevan@iinteractive.comE<gt>
76 =head1 COPYRIGHT AND LICENSE
78 Copyright 2006-2010 by Infinity Interactive, Inc.
80 L<http://www.iinteractive.com>
82 This library is free software; you can redistribute it and/or modify
83 it under the same terms as Perl itself.