Tweaks to "with"
Shawn M Moore [Tue, 17 Jun 2008 03:44:04 +0000 (03:44 +0000)]
lib/Mouse.pm

index cb525f0..939d845 100644 (file)
@@ -76,8 +76,10 @@ do {
                 my $role  = shift;
                 my $class = $caller->meta;
 
+                confess "Mouse::Role only supports 'with' on individual roles at a time";
+
                 Mouse::load_class($role);
-                $role->apply_to_class($class);
+                $role->meta->apply_to_class($class);
             };
         },
     );