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 shift->meta->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 - Object Meta Object
52 This class is basically a stub, it provides almost no functionality at all,
53 and really just exists to make the Class::MOP metamodel complete.
59 +-----| Class::MOP::Class |
60 | +-------------------+
63 +--------------------+ : +--------------------+
64 | Class::MOP::Module | : | Class::MOP::Object |
65 +--------------------+ : +--------------------+
68 | +---------------------+ |
69 +--->| Class::MOP::Package |-----+
70 +---------------------+
73 ..(is an instance of)..>
74 --(is a subclass of)--->
76 A deeper discussion of this model is currently beyond the scope of
85 =item B<dump (?$max_depth)>
87 This will C<require> the L<Data::Dumper> module and then dump a
88 representation of your object. It passed the C<$max_depth> arg
89 to C<$Data::Dumper::Maxdepth>. The default C<$max_depth> is 1,
90 so it will not go crazy and print a massive bunch of stuff.
91 Adjust this as nessecary.
97 Stevan Little E<lt>stevan@iinteractive.comE<gt>
99 =head1 COPYRIGHT AND LICENSE
101 Copyright 2006-2009 by Infinity Interactive, Inc.
103 L<http://www.iinteractive.com>
105 This library is free software; you can redistribute it and/or modify
106 it under the same terms as Perl itself.