X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FObject.pm;h=cd87874a28ed648677c491b5a6f37f6f8961e261;hb=fa907f2e8b7d7eddeb6568165fcf2568856ee29a;hp=261b7bf333f4fc23afe16d415aa4ed1c241e0465;hpb=8de5717850eb1f406e5f71d2ccfac33c72cc490b;p=gitmo%2FMoose.git diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index 261b7bf..cd87874 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -12,16 +12,13 @@ use Try::Tiny (); use if ( not our $__mx_is_compiled ), 'Moose::Meta::Class'; use if ( not our $__mx_is_compiled ), metaclass => 'Moose::Meta::Class'; -our $VERSION = '0.92'; +our $VERSION = '0.96'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; sub new { my $class = shift; - Carp::cluck 'Calling new() on an instance is deprecated,' - . ' please use (blessed $obj)->new' if Scalar::Util::blessed($class); - my $params = $class->BUILDARGS(@_); my $real_class = Scalar::Util::blessed($class) || $class; @@ -121,12 +118,8 @@ sub does { my ($self, $role_name) = @_; my $meta = Class::MOP::class_of($self); (defined $role_name) - || $meta->throw_error("You much supply a role name to does()"); - foreach my $class ($meta->class_precedence_list) { - my $m = $meta->initialize($class); - return 1 - if $m->can('does_role') && $m->does_role($role_name); - } + || $meta->throw_error("You must supply a role name to does()"); + return 1 if $meta->can('does_role') && $meta->does_role($role_name); return 0; } @@ -220,9 +213,7 @@ the maximum depth is 1, to avoid making a mess. =head1 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. +See L for details on reporting bugs. =head1 AUTHOR @@ -230,7 +221,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2009 by Infinity Interactive, Inc. +Copyright 2006-2010 by Infinity Interactive, Inc. L