use CMOPC->initialize instead of ->meta
Shawn M Moore [Sun, 9 Nov 2008 07:26:11 +0000 (07:26 +0000)]
lib/MooseX/Role/Parameterized.pm

index cd9d732..c6a84e7 100644 (file)
@@ -20,14 +20,14 @@ sub parameter {
     $names = [$names] if !ref($names);
 
     for my $name (@$names) {
-        $caller->meta->add_parameter($name, @_);
+        Class::MOP::Class->initialize($caller)->add_parameter($name, @_);
     }
 }
 
 sub role {
     my $caller         = shift;
     my $role_generator = shift;
-    $caller->meta->role_generator($role_generator);
+    Class::MOP::Class->initialize($caller)->role_generator($role_generator);
 }
 
 sub init_meta {