Version 0.96.
[gitmo/Moose.git] / lib / Moose / Util.pm
index 4ba6456..20b48e3 100644 (file)
@@ -8,7 +8,7 @@ use Sub::Exporter;
 use Scalar::Util 'blessed';
 use Class::MOP   0.60;
 
-our $VERSION   = '0.93_03';
+our $VERSION   = '0.96';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -212,6 +212,18 @@ sub add_method_modifier {
             $meta->$add_modifier_method( $_->name, $code )
                 for @matched_methods;
         }
+        elsif ($method_modifier_type eq 'ARRAY') {
+            $meta->$add_modifier_method( $_, $code ) for @{$args->[0]};
+        }
+        else {
+            $meta->throw_error(
+                sprintf(
+                    "Methods passed to %s must be provided as a list, arrayref or regex, not %s",
+                    $modifier_name,
+                    $method_modifier_type,
+                )
+            );
+        }
     }
     else {
         $meta->$add_modifier_method( $_, $code ) for @{$args};