fix mixing of typelibs with regular Moose classes 0.12
Rafael Kitover [Sun, 14 Jun 2009 21:42:04 +0000 (14:42 -0700)]
Changes
lib/MooseX/Types.pm

diff --git a/Changes b/Changes
index cefa04c..88b4574 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+0.12    Sun Jun 14 14:39:57 PDT 2009
+        - fix mixing of typelibs with regular Moose classes
+
 0.11    Sat May 23 18:02:35 PDT 2009
         - warning on string types and unregistered class/role types
         - better error for missing comma
index a08fb6c..55bca7e 100644 (file)
@@ -20,7 +20,7 @@ use Scalar::Util                      'reftype';
 use namespace::clean -except => [qw( meta )];
 
 use 5.008;
-our $VERSION = '0.11';
+our $VERSION = '0.12';
 my $UndefMsg = q{Action for type '%s' not yet defined in library '%s'};
 
 =head1 SYNOPSIS
@@ -374,8 +374,8 @@ sub type_export_generator {
     
     ## Return an anonymous subroutine that will generate the proxied type
     ## constraint for you.
-    
-    return subname $name => sub {
+
+    return subname "__ANON__::$name" => sub {
         my $type_constraint = $class->create_base_type_constraint($name);
 
         if(defined(my $params = shift @_)) {