X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FObject.pm;h=d2ec6ffb01564975e109e6f82189be85b756fb75;hb=4fbd4b9bca7c0d3fead3f42a49e3671a6e7fc54f;hp=1b7d2c5bc358f3e34b90525bcf38257df1ba5cf6;hpb=f3938c217bb3ff340d2744a56385df03b6847c3f;p=gitmo%2FClass-MOP.git
diff --git a/lib/Class/MOP/Object.pm b/lib/Class/MOP/Object.pm
index 1b7d2c5..d2ec6ff 100644
--- a/lib/Class/MOP/Object.pm
+++ b/lib/Class/MOP/Object.pm
@@ -6,7 +6,8 @@ use warnings;
use Scalar::Util 'blessed';
-our $VERSION = '0.65';
+our $VERSION = '0.98';
+$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
# introspection
@@ -16,6 +17,10 @@ sub meta {
Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
}
+sub _new {
+ Class::MOP::class_of(shift)->new_object(@_);
+}
+
# RANT:
# Cmon, how many times have you written
# the following code while debugging:
@@ -40,50 +45,27 @@ __END__
=head1 NAME
-Class::MOP::Object - Object Meta Object
+Class::MOP::Object - Base class for metaclasses
=head1 DESCRIPTION
-This class is basically a stub, it provides no functionality at all,
-and really just exists to make the Class::MOP metamodel complete.
-
- ......
- : :
- : v
- +-------------------+
- +-----| Class::MOP::Class |
- | +-------------------+
- | ^ ^ ^
- v : : :
- +--------------------+ : +--------------------+
- | Class::MOP::Module | : | Class::MOP::Object |
- +--------------------+ : +--------------------+
- | : ^
- | : |
- | +---------------------+ |
- +--->| Class::MOP::Package |-----+
- +---------------------+
-
- legend:
- ..(is an instance of)..>
- --(is a subclass of)--->
-
-A deeper discussion of this model is currently beyond the scope of
-this documenation.
-
+This class is a very minimal base class for metaclasses.
+
=head1 METHODS
+This class provides a few methods which are useful in all metaclasses.
+
=over 4
-=item B
+=item B<< Class::MOP::???->meta >>
+
+This returns a L object.
-=item B
+=item B<< $metaobject->dump($max_depth) >>
-This will C the L module and then dump a
-representation of your object. It passed the C<$max_depth> arg
-to C<$Data::Dumper::Maxdepth>. The default C<$max_depth> is 1,
-so it will not go crazy and print a massive bunch of stuff.
-Adjust this as nessecary.
+This method uses L to dump the object. You can pass an
+optional maximum depth, which will set C<$Data::Dumper::Maxdepth>. The
+default maximum depth is 1.
=back
@@ -93,7 +75,7 @@ Stevan Little Estevan@iinteractive.comE
=head1 COPYRIGHT AND LICENSE
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2010 by Infinity Interactive, Inc.
L