X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeConstraint%2FRegistry.pm;h=ff2157c14e8f339c2d5a10e0ebba30c5074e85ba;hb=4c015454152fff7c0a2c71665d4dc5e0f39b835b;hp=d95963250f095a91e5de2ae743ef7f1ba3014f4e;hpb=cbac012a1621da5d2c04ee898cc7f701f17cc045;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/TypeConstraint/Registry.pm b/lib/Moose/Meta/TypeConstraint/Registry.pm index d959632..ff2157c 100644 --- a/lib/Moose/Meta/TypeConstraint/Registry.pm +++ b/lib/Moose/Meta/TypeConstraint/Registry.pm @@ -33,7 +33,7 @@ sub new { sub has_type_constraint { my ($self, $type_name) = @_; - exists $self->type_constraints->{$type_name} ? 1 : 0 + ($type_name and exists $self->type_constraints->{$type_name}) ? 1 : 0 } sub get_type_constraint {