X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeConstraint%2FRole.pm;h=766ef1c3b15f79e0292d625e46e317afb21ce4f1;hb=359364f340a0dde87558e04313249d85d8c57498;hp=7727173f36e140e58519a05212d2c1d9a99037f3;hpb=74397c13ad55fc865db34721aed512d4f605fadf;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/TypeConstraint/Role.pm b/lib/Moose/Meta/TypeConstraint/Role.pm index 7727173..766ef1c 100644 --- a/lib/Moose/Meta/TypeConstraint/Role.pm +++ b/lib/Moose/Meta/TypeConstraint/Role.pm @@ -7,7 +7,7 @@ use metaclass; use Scalar::Util 'blessed'; use Moose::Util::TypeConstraints (); -our $VERSION = '0.75_01'; +our $VERSION = '0.78'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -47,8 +47,8 @@ sub parents { # if anybody thinks this problematic please discuss on IRC. # a possible fix is to add by attr indexing to the type registry to find types of a certain property # regardless of their name - Moose::Util::TypeConstraints::find_type_constraint($_) - || + Moose::Util::TypeConstraints::find_type_constraint($_) + || __PACKAGE__->new( role => $_, name => "__ANON__" ) } @{ Class::MOP::class_of($self->role)->get_roles }, ); @@ -84,7 +84,7 @@ sub is_subtype_of { my $type = Moose::Util::TypeConstraints::find_type_constraint($type_or_name_or_role); return unless defined $type; - + if ( $type->isa(__PACKAGE__) ) { # if $type_or_name_or_role isn't a role, it might be the TC name of another ::Role type # or it could also just be a type object in this branch @@ -165,7 +165,7 @@ object! =head1 BUGS -All complex software has bugs lurking in it, and this module is no +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.