2 package Class::MOP::Object;
7 use Scalar::Util 'blessed';
10 our $AUTHORITY = 'cpan:STEVAN';
15 require Class::MOP::Class;
16 Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
20 shift->meta->new_object(@_);
24 # Cmon, how many times have you written
25 # the following code while debugging:
30 # It can get seriously annoying, so why
31 # not just do this ...
35 local $Data::Dumper::Maxdepth = shift || 1;
36 Data::Dumper::Dumper $self;
47 Class::MOP::Object - Object Meta Object
51 This class is basically a stub, it provides no functionality at all,
52 and really just exists to make the Class::MOP metamodel complete.
58 +-----| Class::MOP::Class |
59 | +-------------------+
62 +--------------------+ : +--------------------+
63 | Class::MOP::Module | : | Class::MOP::Object |
64 +--------------------+ : +--------------------+
67 | +---------------------+ |
68 +--->| Class::MOP::Package |-----+
69 +---------------------+
72 ..(is an instance of)..>
73 --(is a subclass of)--->
75 A deeper discussion of this model is currently beyond the scope of
84 =item B<dump (?$max_depth)>
86 This will C<require> the L<Data::Dumper> module and then dump a
87 representation of your object. It passed the C<$max_depth> arg
88 to C<$Data::Dumper::Maxdepth>. The default C<$max_depth> is 1,
89 so it will not go crazy and print a massive bunch of stuff.
90 Adjust this as nessecary.
96 Stevan Little E<lt>stevan@iinteractive.comE<gt>
98 =head1 COPYRIGHT AND LICENSE
100 Copyright 2006-2008 by Infinity Interactive, Inc.
102 L<http://www.iinteractive.com>
104 This library is free software; you can redistribute it and/or modify
105 it under the same terms as Perl itself.