bump version to 0.91
[gitmo/Moose.git] / lib / Moose / Meta / Role / Application / ToInstance.pm
index 184bf64..8681fb6 100644 (file)
@@ -4,10 +4,10 @@ use strict;
 use warnings;
 use metaclass;
 
-use Carp         'confess';
 use Scalar::Util 'blessed';
 
-our $VERSION   = '0.55';
+our $VERSION   = '0.91';
+$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use base 'Moose::Meta::Role::Application::ToClass';
@@ -29,7 +29,7 @@ sub apply {
         $class = $ANON_CLASSES{$anon_role_key};
     }
     else {
-        my $obj_meta = eval { $object->meta } || 'Moose::Meta::Class';
+        my $obj_meta = Class::MOP::class_of($object) || 'Moose::Meta::Class';
         $class = $obj_meta->create_anon_class(
             superclasses => [ blessed($object) ]
         );
@@ -78,7 +78,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>