X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FTypeConstraint.pm;h=30edadd01dcd2f9ed37dd9b296d7725d98d0805f;hb=c489a4771291bba160fa598a9293e1efdfc41c2e;hp=052616336863c680f87462fdfc6c72dc30a32c4f;hpb=8adc0b23d04403eebb4e296a440079d8b475ebc0;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/TypeConstraint.pm b/lib/Mouse/Meta/TypeConstraint.pm index 0526163..30edadd 100644 --- a/lib/Mouse/Meta/TypeConstraint.pm +++ b/lib/Mouse/Meta/TypeConstraint.pm @@ -2,6 +2,8 @@ package Mouse::Meta::TypeConstraint; use Mouse::Util qw(:meta); # enables strict and warnings use overload + 'bool' => sub { 1 }, # always true + '""' => sub { $_[0]->name }, # stringify to tc name '|' => sub { # or-combination