Class::MOP::Method and co. are now stricter and require the package_name and name...
[gitmo/Class-MOP.git] / lib / Class / MOP / Method / Constructor.pm
index 9395892..893a513 100644 (file)
@@ -20,6 +20,9 @@ sub new {
         || confess "You must pass a metaclass instance if you want to inline"
             if $options{is_inline};
 
+    ($options{package_name} && $options{name})
+        || confess "You must supply the package_name and name parameters";
+
     my $self = bless {
         # from our superclass
         '&!body'                 => undef,