From: Yuval Kogman <nothingmuch@woobling.org>
Date: Sat, 21 Jun 2008 13:17:25 +0000 (+0000)
Subject: add a comment about a bit of compat code
X-Git-Tag: 0_55~105
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2f0f6e950854a4c43f70b030548846bd9d9f231;p=gitmo%2FMoose.git

add a comment about a bit of compat code
---

diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm
index 36faa9b..51cfd79 100644
--- a/lib/Moose/Util/TypeConstraints.pm
+++ b/lib/Moose/Util/TypeConstraints.pm
@@ -108,7 +108,7 @@ sub export_type_constraints_as_functions {
     no strict 'refs';
     foreach my $constraint (keys %{$REGISTRY->type_constraints}) {
         my $tc = $REGISTRY->get_type_constraint($constraint)->_compiled_type_constraint;
-        *{"${pkg}::${constraint}"} = sub { $tc->($_[0]) ? 1 : undef };
+        *{"${pkg}::${constraint}"} = sub { $tc->($_[0]) ? 1 : undef }; # the undef is for compat
     }
 }