X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FApplication%2FToInstance.pm;h=7e5b4d667ec7b40e992dfc2499f636a96d43e6b2;hb=bfe4136962533b04367ff4f5f3c483536c31231d;hp=be2ef37ef0f53b579ca290dda158ebc2b150310a;hpb=3d24a30e079d69e9f605c0c98c8041dcb3119a62;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Application/ToInstance.pm b/lib/Moose/Meta/Role/Application/ToInstance.pm index be2ef37..7e5b4d6 100644 --- a/lib/Moose/Meta/Role/Application/ToInstance.pm +++ b/lib/Moose/Meta/Role/Application/ToInstance.pm @@ -4,10 +4,9 @@ use strict; use warnings; use metaclass; -use Carp 'confess'; use Scalar::Util 'blessed'; -our $VERSION = '0.56'; +our $VERSION = '0.72'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -23,6 +22,11 @@ my %ANON_CLASSES; sub apply { my ($self, $role, $object) = @_; + return + if $object->can('meta') + && $object->meta->can('does_role') + && $object->meta->does_role( $role->name ); + my $anon_role_key = (blessed($object) . $role->name); my $class; @@ -79,7 +83,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2008 by Infinity Interactive, Inc. +Copyright 2006-2009 by Infinity Interactive, Inc. L